Module Name:    src
Committed By:   martin
Date:           Tue Sep 22 12:21:11 UTC 2020

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

Log Message:
In the concrete partitions editor, after deleting the last partition move
the menu selection to the "add a partition" entry (instead of the sentinel
line which is not an active menu entry).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/label.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/label.c
diff -u src/usr.sbin/sysinst/label.c:1.22 src/usr.sbin/sysinst/label.c:1.23
--- src/usr.sbin/sysinst/label.c:1.22	Tue Sep 22 11:44:44 2020
+++ src/usr.sbin/sysinst/label.c	Tue Sep 22 12:21:11 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: label.c,v 1.22 2020/09/22 11:44:44 martin Exp $	*/
+/*	$NetBSD: label.c,v 1.23 2020/09/22 12:21:11 martin Exp $	*/
 
 /*
  * Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.22 2020/09/22 11:44:44 martin Exp $");
+__RCSID("$NetBSD: label.c,v 1.23 2020/09/22 12:21:11 martin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -892,6 +892,8 @@ edit_ptn(menudesc *menu, void *arg)
 		    sizeof(*menu->opts)*(menu->numopts-edit.index));
 		menu->numopts--;
 		menu->cursel = 0;
+		if (pset->parts->num_part == 0)
+			menu->cursel = 1;	/* skip sentinel line */
 
 		/* things have changed, re-sort */
 		pset->num--;

Reply via email to