Module Name:    src
Committed By:   martin
Date:           Fri Dec 13 21:46:59 UTC 2019

Modified Files:
        src/usr.sbin/sysinst: disklabel.c

Log Message:
When trying to tell a fictious but empty label from a real one, skip
partition a if it has the same start and size as the raw partition.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/sysinst/disklabel.c

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.21 src/usr.sbin/sysinst/disklabel.c:1.22
--- src/usr.sbin/sysinst/disklabel.c:1.21	Thu Dec 12 20:14:21 2019
+++ src/usr.sbin/sysinst/disklabel.c	Fri Dec 13 21:46:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.21 2019/12/12 20:14:21 martin Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.22 2019/12/13 21:46:59 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -278,6 +278,12 @@ disklabel_parts_read(const char *disk, d
 		for (int part = 0; part < parts->l.d_npartitions; part++) {
 			if (parts->l.d_partitions[part].p_fstype == FS_UNUSED)
 				continue;
+			if (part == 0 &&
+			    parts->l.d_partitions[part].p_offset ==
+			     parts->l.d_partitions[RAW_PART].p_offset &&
+			    parts->l.d_partitions[part].p_size ==
+			     parts->l.d_partitions[RAW_PART].p_size)
+				continue;
 			if (part == RAW_PART)
 				continue;
 			found_real_part = true;

Reply via email to