From 5794ae48635b717529a6b66028bedddf92895670 Mon Sep 17 00:00:00 2001 From: tjr Date: Fri, 25 Apr 2003 10:07:50 +0000 Subject: 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. --- usr.sbin/quot/quot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 4214844..bd1075d 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -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; -- cgit v1.1