Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst Reject (what we consider) empty/invalid fak...



details:   https://anonhg.NetBSD.org/src/rev/1acb2f06b278
branches:  trunk
changeset: 847230:1acb2f06b278
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Dec 15 12:01:05 2019 +0000

description:
Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.

diffstat:

 usr.sbin/sysinst/disklabel.c  |   5 ++---
 usr.sbin/sysinst/partitions.c |  16 +---------------
 usr.sbin/sysinst/partitions.h |   3 +--
 3 files changed, 4 insertions(+), 20 deletions(-)

diffs (71 lines):

diff -r 3f400519c40d -r 1acb2f06b278 usr.sbin/sysinst/disklabel.c
--- a/usr.sbin/sysinst/disklabel.c      Sun Dec 15 11:49:28 2019 +0000
+++ b/usr.sbin/sysinst/disklabel.c      Sun Dec 15 12:01:05 2019 +0000
@@ -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 @@
        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 @@
        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 ||
diff -r 3f400519c40d -r 1acb2f06b278 usr.sbin/sysinst/partitions.c
--- a/usr.sbin/sysinst/partitions.c     Sun Dec 15 11:49:28 2019 +0000
+++ b/usr.sbin/sysinst/partitions.c     Sun Dec 15 12:01:05 2019 +0000
@@ -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 @@
 }
 #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
  */
diff -r 3f400519c40d -r 1acb2f06b278 usr.sbin/sysinst/partitions.h
--- a/usr.sbin/sysinst/partitions.h     Sun Dec 15 11:49:28 2019 +0000
+++ b/usr.sbin/sysinst/partitions.h     Sun Dec 15 12:01:05 2019 +0000
@@ -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 @@
  */
 void partitions_init(void);
 void partitions_cleanup(void);
-bool only_have_disklabel(void);
 



Home | Main Index | Thread Index | Old Index