ext2: adjust dirent size on new block
This commit is contained in:
parent
bec327a4cc
commit
1ccf067ddd
1 changed files with 1 additions and 1 deletions
|
|
@ -955,7 +955,7 @@ static long ext2_creat(struct fs *vfs, const char *path, ftype_t type)
|
||||||
|
|
||||||
/* write the entry */
|
/* write the entry */
|
||||||
entry->inode = inode_no;
|
entry->inode = inode_no;
|
||||||
entry->rec_len = sizeof(struct ext2_dir_entry) + strlen(base);
|
entry->rec_len = fs->block_size;
|
||||||
entry->name_len = strlen(base);
|
entry->name_len = strlen(base);
|
||||||
entry->file_type = type;
|
entry->file_type = type;
|
||||||
memcpy(entry->name, base, strlen(base));
|
memcpy(entry->name, base, strlen(base));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue