diff options
author | mckusick <mckusick@FreeBSD.org> | 2017-08-24 21:44:23 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2017-08-24 21:44:23 +0000 |
commit | e2240f7f771e75e26d2b84c54a692d95802ac3c4 (patch) | |
tree | e3258b205c3cffde490a1746483c3f1587f4222f /sbin/fsirand | |
parent | 5038efc5dafbefffcb449c1b3827b7fcd23183ac (diff) | |
download | FreeBSD-src-e2240f7f771e75e26d2b84c54a692d95802ac3c4.zip FreeBSD-src-e2240f7f771e75e26d2b84c54a692d95802ac3c4.tar.gz |
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)
Diffstat (limited to 'sbin/fsirand')
-rw-r--r-- | sbin/fsirand/fsirand.c | 11 |
1 files changed, 0 insertions, 11 deletions
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 <sys/param.h> -#include <sys/disklabel.h> #include <sys/resource.h> #include <ufs/ufs/dinode.h> @@ -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; |