From 656df90df15f92ec28b0581a52ac846fb2793d4c Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 12 Feb 2011 13:17:14 +0000 Subject: In checker, read journal by sectors. Due to UFS insistence to pretend that device sector size is 512 bytes, sector size is obtained from ioctl(DIOCGSECTORSIZE) for real devices, and from the label otherwise. The file images without label have to be made with 512 sector size. In collaboration with: pho Reviewed by: jeff Tested by: bz, pho --- sbin/fsck_ffs/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin/fsck_ffs/setup.c') diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 1628ffb..e51c0a9 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -446,7 +446,7 @@ sblock_init(void) if (sblk.b_un.b_buf == NULL || asblk.b_un.b_buf == NULL) errx(EEXIT, "cannot allocate space for superblock"); if ((lp = getdisklabel(NULL, fsreadfd))) - dev_bsize = secsize = lp->d_secsize; + real_dev_bsize = dev_bsize = secsize = lp->d_secsize; else dev_bsize = secsize = DEV_BSIZE; } -- cgit v1.1