From 93c0466c90e51dcaa51b129b4c649fb0be66e2e1 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Sun, 11 Jun 2017 16:32:12 +0200 Subject: [PATCH] mufs: simplify super block by embedding struct mufs_dtree instead of struct mufs_dentry --- source/fs/mufs/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/fs/mufs/super.c b/source/fs/mufs/super.c index fcd0814..612bc54 100644 --- a/source/fs/mufs/super.c +++ b/source/fs/mufs/super.c @@ -14,7 +14,7 @@ struct mufs_super { char magic[4]; uint32_t nblocks; - struct mufs_dentry root; + struct mufs_dtree root; } __attribute__((packed)); int mufs_mount(struct mufs *fs, struct flash_dev *dev) @@ -51,11 +51,9 @@ int mufs_format(struct flash_dev *dev) super.nblocks = flash_get_capacity(dev) >> dev->log2_block_size; - super.root.type = MUFS_DIR; super.root.file_size = 0; super.root.root = 0; super.root.depth = 0; - super.root.path_len = 0; if (flash_write(dev, 0, &super, sizeof super) == 0) return -1;