Repair the UFS2 superblock location consistency check so that it succeeds
on valid superblocks instead of issuing the error "not a BSD filesystem". fs_sblockloc is a byte offset, not a fragment number. This change makes quot work properly on UFS2 filesystems, which is important now that UFS2 is the default.
This commit is contained in:
parent
4985f242d1
commit
5794ae4863
@ -563,7 +563,7 @@ quot(name,mp)
|
||||
fs = (struct fs *)superblock;
|
||||
if ((fs->fs_magic == FS_UFS1_MAGIC ||
|
||||
(fs->fs_magic == FS_UFS2_MAGIC &&
|
||||
fs->fs_sblockloc == numfrags(fs, sblock_try[i]))) &&
|
||||
fs->fs_sblockloc == sblock_try[i])) &&
|
||||
fs->fs_bsize <= MAXBSIZE &&
|
||||
fs->fs_bsize >= sizeof(struct fs))
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user