summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2019-12-12 19:29:05 +0000
committermartin <martin@NetBSD.org>2019-12-12 19:29:05 +0000
commitfacfd1fbaf18b2d982c58f2fbdc55d41c38c01bc (patch)
treea09b7ecdcb5bf452ed895b69c894a4344f65c2d3
parent131aaa12f74f15e376d09638df6aa5b19048caaf (diff)
Fix DISKLABEL_NO_ONDISK_VERIFY (accidently disabled in previous)
-rw-r--r--usr.sbin/sysinst/disklabel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/sysinst/disklabel.c b/usr.sbin/sysinst/disklabel.c
index dd84700f2c0..2d2b29c46cc 100644
--- a/usr.sbin/sysinst/disklabel.c
+++ b/usr.sbin/sysinst/disklabel.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.19 2019/12/12 12:19:39 martin Exp $ */
+/* $NetBSD: disklabel.c,v 1.20 2019/12/12 19:29:05 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@@ -170,10 +170,10 @@ disklabel_parts_read(const char *disk, daddr_t start, daddr_t len,
int fd;
char diskpath[MAXPATHLEN];
uint flags;
+#ifndef DISKLABEL_NO_ONDISK_VERIFY
bool only_dl = only_have_disklabel();
bool have_raw_label = false;
-#ifndef DISKLABEL_NO_ONDISK_VERIFY
/*
* Verify we really have a disklabel.
*/
@@ -266,6 +266,7 @@ disklabel_parts_read(const char *disk, daddr_t start, daddr_t len,
}
close(fd);
+#ifndef DISKLABEL_NO_ONDISK_VERIFY
if (!have_raw_label && only_dl) {
bool found_real_part = false;
@@ -288,6 +289,7 @@ disklabel_parts_read(const char *disk, daddr_t start, daddr_t len,
return NULL;
}
}
+#endif
return &parts->dp;
}