Module Name: src
Committed By: martin
Date: Sun Dec 15 12:01:05 UTC 2019
Modified Files:
src/usr.sbin/sysinst: disklabel.c partitions.c partitions.h
Log Message:
Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/disklabel.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/partitions.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/partitions.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/disklabel.c
diff -u src/usr.sbin/sysinst/disklabel.c:1.25 src/usr.sbin/sysinst/disklabel.c:1.26
--- src/usr.sbin/sysinst/disklabel.c:1.25 Sat Dec 14 20:41:58 2019
+++ src/usr.sbin/sysinst/disklabel.c Sun Dec 15 12:01:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.c,v 1.25 2019/12/14 20:41:58 martin Exp $ */
+/* $NetBSD: disklabel.c,v 1.26 2019/12/15 12:01:05 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@@ -171,7 +171,6 @@ disklabel_parts_read(const char *disk, d
char diskpath[MAXPATHLEN];
uint flags;
#ifndef DISKLABEL_NO_ONDISK_VERIFY
- bool only_dl = only_have_disklabel();
bool have_raw_label = false;
/*
@@ -267,7 +266,7 @@ disklabel_parts_read(const char *disk, d
close(fd);
#ifndef DISKLABEL_NO_ONDISK_VERIFY
- if (!have_raw_label && !only_dl) {
+ if (!have_raw_label) {
bool found_real_part = false;
if (parts->l.d_npartitions <= RAW_PART ||
Index: src/usr.sbin/sysinst/partitions.c
diff -u src/usr.sbin/sysinst/partitions.c:1.7 src/usr.sbin/sysinst/partitions.c:1.8
--- src/usr.sbin/sysinst/partitions.c:1.7 Fri Dec 13 22:12:41 2019
+++ src/usr.sbin/sysinst/partitions.c Sun Dec 15 12:01:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: partitions.c,v 1.7 2019/12/13 22:12:41 martin Exp $ */
+/* $NetBSD: partitions.c,v 1.8 2019/12/15 12:01:05 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@@ -131,20 +131,6 @@ static bool have_only_disklabel_boot_sup
}
#endif
-bool
-only_have_disklabel(void)
-{
-
- if (num_available_part_schemes > 1)
- return false;
-
-#if RAW_PART != 2
- if (available_part_schemes[0] == &only_disklabel_parts)
- return true;
-#endif
- return available_part_schemes[0] == &disklabel_parts;
-}
-
/*
* One time initialization
*/
Index: src/usr.sbin/sysinst/partitions.h
diff -u src/usr.sbin/sysinst/partitions.h:1.10 src/usr.sbin/sysinst/partitions.h:1.11
--- src/usr.sbin/sysinst/partitions.h:1.10 Fri Dec 13 22:12:41 2019
+++ src/usr.sbin/sysinst/partitions.h Sun Dec 15 12:01:05 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: partitions.h,v 1.10 2019/12/13 22:12:41 martin Exp $ */
+/* $NetBSD: partitions.h,v 1.11 2019/12/15 12:01:05 martin Exp $ */
/*
* Copyright 2018 The NetBSD Foundation, Inc.
@@ -580,5 +580,4 @@ bool generic_adapt_foreign_part_info(
*/
void partitions_init(void);
void partitions_cleanup(void);
-bool only_have_disklabel(void);