From e2240f7f771e75e26d2b84c54a692d95802ac3c4 Mon Sep 17 00:00:00 2001 From: mckusick Date: Thu, 24 Aug 2017 21:44:23 +0000 Subject: MFC of 276737, 322200, 322201, 322271, and 322297 276737: Remove old ioctl use and support 322200: Remove (broken) search for alternate superblocks 322201: Show differences when alternate superblock fails to match 322271: Cleanup for 322200. 322297: Restore fsck_ffs ability to find alternate superblocks Discussed with: kib, imp Differential Revision: https://reviews.freebsd.org/D11589 Approved by: re (kib) --- sbin/fsirand/fsirand.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'sbin/fsirand') diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index c373c5b..0fea239 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -36,7 +36,6 @@ static const char rcsid[] = #endif /* not lint */ #include -#include #include #include @@ -120,22 +119,12 @@ fsirand(char *device) char sbuf[SBLOCKSIZE], sbuftmp[SBLOCKSIZE]; int i, devfd, n, cg; u_int32_t bsize = DEV_BSIZE; - struct disklabel label; if ((devfd = open(device, printonly ? O_RDONLY : O_RDWR)) < 0) { warn("can't open %s", device); return (1); } - /* Get block size (usually 512) from disklabel if possible */ - if (!ignorelabel) { - if (ioctl(devfd, DIOCGDINFO, &label) < 0) - warn("can't read disklabel, using sector size of %d", - bsize); - else - bsize = label.d_secsize; - } - dp1 = NULL; dp2 = NULL; -- cgit v1.1