aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsirand/fsirand.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2015-01-06 05:28:37 +0000
committerWarner Losh <imp@FreeBSD.org>2015-01-06 05:28:37 +0000
commita91275f72fda164c3d0efdb1190d334b5b447f22 (patch)
tree7642f45fc42d6192ce6b58f0f4c3c598067a0410 /sbin/fsirand/fsirand.c
parenta3f9f9a5a860e62873a5a9689fc7f0b703b117c0 (diff)
downloadsrc-a91275f72fda164c3d0efdb1190d334b5b447f22.tar.gz
src-a91275f72fda164c3d0efdb1190d334b5b447f22.zip
Remove old ioctl use and support, once and for all.
Notes
Notes: svn path=/head/; revision=276737
Diffstat (limited to 'sbin/fsirand/fsirand.c')
-rw-r--r--sbin/fsirand/fsirand.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index c373c5bb56f5..0fea239c893f 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;