mufs: add find_dirent_size() to determine how many bytes are used within a directory bin
This commit is contained in:
parent
7107daa4b5
commit
f2d4d60c01
3 changed files with 37 additions and 0 deletions
|
@ -53,6 +53,8 @@ int mufs_mkpath(struct mufs *fs, const char *path, unsigned type)
|
|||
dirent.tree.root = 0;
|
||||
dirent.tree.depth = 0;
|
||||
|
||||
tree->file_size = find_dirent_size(fs, tree, tree->file_size);
|
||||
|
||||
if (!is_aligned(tree->file_size, fs->dev->log2_block_size) &&
|
||||
write_dirent(tree, tree->file_size, &dirent) > 0)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue