summaryrefslogtreecommitdiff
path: root/sbin/disklabel/disklabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/disklabel/disklabel.c')
-rw-r--r--sbin/disklabel/disklabel.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 62b3846e782d..1f396a18f4be 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1347,17 +1347,10 @@ getvirginlabel(void)
warn("cannot open %s", namebuf);
return (NULL);
}
-
- /*
- * Try to use the new get-virgin-label ioctl. If it fails,
- * fallback to the old get-disdk-info ioctl.
- */
- if (ioctl(f, DIOCGDVIRGIN, &lab) < 0) {
- if (ioctl(f, DIOCGDINFO, &lab) < 0) {
- warn("ioctl DIOCGDINFO");
- close(f);
- return (NULL);
- }
+ if (ioctl(f, DIOCGDINFO, &lab) < 0) {
+ warn("ioctl DIOCGDINFO");
+ close(f);
+ return (NULL);
}
close(f);
lab.d_boot0 = NULL;