Module Name:    src
Committed By:   martin
Date:           Thu Jan  9 19:51:49 UTC 2020

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

Log Message:
When reading the secondary disklabel partitions from an existing disklabel
set the mbr partitions as parent.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/sysinst/mbr.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/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.24 src/usr.sbin/sysinst/mbr.c:1.25
--- src/usr.sbin/sysinst/mbr.c:1.24	Thu Jan  9 13:22:30 2020
+++ src/usr.sbin/sysinst/mbr.c	Thu Jan  9 19:51:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.24 2020/01/09 13:22:30 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.25 2020/01/09 19:51:49 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1743,10 +1743,13 @@ mbr_read_disklabel(struct disk_partition
 				return NULL;
 		}
 
-		if (!force_empty)
+		if (!force_empty) {
 			myparts->dlabel = disklabel_parts.read_from_disk(
 			    myparts->dp.disk, part.start, part.size,
 			    &disklabel_parts);
+			if (myparts->dlabel != NULL)
+				myparts->dlabel->parent = &myparts->dp;
+		}
 
 		if (myparts->dlabel == NULL && part.size > 0) {
 			/* we just created the outer partitions? */

Reply via email to