Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst In the concrete partitions editor, after de...



details:   https://anonhg.NetBSD.org/src/rev/9b1d6d6258a4
branches:  trunk
changeset: 955166:9b1d6d6258a4
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Sep 22 12:21:11 2020 +0000

description:
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).

diffstat:

 usr.sbin/sysinst/label.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 590bd593bdfa -r 9b1d6d6258a4 usr.sbin/sysinst/label.c
--- a/usr.sbin/sysinst/label.c  Tue Sep 22 11:53:10 2020 +0000
+++ b/usr.sbin/sysinst/label.c  Tue Sep 22 12:21:11 2020 +0000
@@ -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 @@
                    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--;



Home | Main Index | Thread Index | Old Index