aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs/marfs/disklevel.c
diff options
context:
space:
mode:
authorMarvin Borner2019-11-24 23:34:32 +0100
committerMarvin Borner2019-11-24 23:34:32 +0100
commitbb57b124d1bb385d41747f50be7dd4f3625539c1 (patch)
treefe461afad63df40571784565e8d435cba8c8e59c /src/kernel/fs/marfs/disklevel.c
parentf9c50b9ff23e9a3e8db5826fef7a6e7ebb8af21d (diff)
Major coding style reformatting -> Kernighan & Ritchie
This project now (hopefully) uses the same style recommended by Kernighan and Ritchie and used in the Linux Kernel
Diffstat (limited to 'src/kernel/fs/marfs/disklevel.c')
-rw-r--r--src/kernel/fs/marfs/disklevel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/kernel/fs/marfs/disklevel.c b/src/kernel/fs/marfs/disklevel.c
index f54dea1..a902362 100644
--- a/src/kernel/fs/marfs/disklevel.c
+++ b/src/kernel/fs/marfs/disklevel.c
@@ -2,9 +2,10 @@
#include <kernel/fs/ata_pio.h>
#include <kernel/fs/marfs/marfs.h>
-void marfs_format(void) {
+void marfs_format(void)
+{
// Create superblock
- struct marfs_SUPERBLOCK sb;
+ struct marfs_superblock sb;
sb.signature = 0x1083B99F34B59645; // Huh, magic?!
sb.n_inodes = (marfs_get_max_lba() - 2) >> 5;
sb.n_chunks = (marfs_get_max_lba() - (2 + sb.n_inodes)) >> 9;
@@ -16,8 +17,8 @@ void marfs_format(void) {
marfs_writeSB(&sb);
// Initialize the inodes
- for (uint32_t i = 0; i < sb.n_inodes; i++) ATA_clear28(iface, 2 + i);
+ for (uint32_t i = 0; i < sb.n_inodes; i++) ata_clear28(interface, 2 + i);
// Initialize the chunks
- for (uint32_t i = 0; i < sb.n_chunks; i++) ATA_clear28(iface, sb.s_first_chunk + i * 512);
+ for (uint32_t i = 0; i < sb.n_chunks; i++) ata_clear28(interface, sb.s_first_chunk + i * 512);
}