Module Name:    src
Committed By:   martin
Date:           Sat Jun 18 13:56:42 UTC 2022

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

Log Message:
An unused partition may not be the install target


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 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.44 src/usr.sbin/sysinst/disklabel.c:1.45
--- src/usr.sbin/sysinst/disklabel.c:1.44	Sun Aug  8 21:50:10 2021
+++ src/usr.sbin/sysinst/disklabel.c	Sat Jun 18 13:56:41 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.44 2021/08/08 21:50:10 andvar Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.45 2022/06/18 13:56:41 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -780,7 +780,8 @@ disklabel_get_part_info(const struct dis
 			    parts->l.d_partitions[part].p_fstype == FS_UNUSED)
 				info->flags |=
 				    PTI_PSCHEME_INTERNAL|PTI_RAW_PART;
-			if (info->start == parts->install_target)
+			if (info->start == parts->install_target &&
+			    parts->l.d_partitions[part].p_fstype != FS_UNUSED)
 				info->flags |= PTI_INSTALL_TARGET;
 #if RAW_PART == 3
 			if (part == (RAW_PART-1) && parts->dp.parent != NULL &&

Reply via email to