isofs: fix reported st_blocks stat(2) field
The st_blocks field should count 512-byte units, not file system block units. The previous computation would cause utilities such as du(1), when used on isofs, to be off by a factor four. Change-Id: If47c234079d19bd5b41f35a97780667efd822509
This commit is contained in:
parent
1d9650c9c5
commit
8d0759b089
@ -325,8 +325,7 @@ void read_inode_iso9660(struct inode_dir_entry *i,
|
||||
/* Initialize stat. */
|
||||
i->i_node->i_stat.st_dev = fs_dev;
|
||||
i->i_node->i_stat.st_blksize = v_pri.logical_block_size_l;
|
||||
i->i_node->i_stat.st_blocks =
|
||||
dir_rec->data_length_l / v_pri.logical_block_size_l;
|
||||
i->i_node->i_stat.st_blocks = dir_rec->data_length_l / 512;
|
||||
i->i_node->i_stat.st_nlink = 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user