mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 12:53:33 +00:00
Fix incorrect output when printing block lists for files small enough
to fit in only direct blocks whose size is exactly a multiple of the filesystem block size. Reported by: Peter Holm Tested by: Peter Holm Sponsored by: Netflix
This commit is contained in:
parent
49a49b37df
commit
28ac223823
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338117
@ -121,7 +121,7 @@ prtblknos(disk, dp)
|
||||
if (i < lastlbn - 1)
|
||||
frags = fs->fs_frag;
|
||||
else
|
||||
frags = howmany(size % fs->fs_bsize,
|
||||
frags = howmany(size - (lastlbn - 1) * fs->fs_bsize,
|
||||
fs->fs_fsize);
|
||||
if (fs->fs_magic == FS_UFS1_MAGIC)
|
||||
blkno = dp->dp1.di_db[i];
|
||||
|
Loading…
Reference in New Issue
Block a user