mufs: simplify super block by embedding struct mufs_dtree instead of struct mufs_dentry
This commit is contained in:
parent
89ec3a94c0
commit
93c0466c90
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue