Module Name: src
Committed By: martin
Date: Fri Jan 23 10:06:31 UTC 2015
Modified Files:
src/usr.sbin/sysinst [netbsd-7]: configmenu.c
Log Message:
Pull up following revision(s) (requested by snj in ticket #445):
usr.sbin/sysinst/configmenu.c: revision 1.3
Handle empty input gracefully by simply jumping back to the config menu.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.sbin/sysinst/configmenu.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/configmenu.c
diff -u src/usr.sbin/sysinst/configmenu.c:1.2 src/usr.sbin/sysinst/configmenu.c:1.2.4.1
--- src/usr.sbin/sysinst/configmenu.c:1.2 Sun Aug 3 16:09:38 2014
+++ src/usr.sbin/sysinst/configmenu.c Fri Jan 23 10:06:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: configmenu.c,v 1.2 2014/08/03 16:09:38 martin Exp $ */
+/* $NetBSD: configmenu.c,v 1.2.4.1 2015/01/23 10:06:30 martin Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -252,10 +252,12 @@ check_root_password(void)
static int
add_new_user(struct menudesc *menu, void *arg)
{
- char username[STRSIZE];
+ char username[STRSIZE] = "";
int inwheel=0;
msg_prompt(MSG_addusername, NULL, username, sizeof username -1);
+ if (strlen(username) == 0)
+ return 0;
process_menu(MENU_yesno, deconst(MSG_addusertowheel));
inwheel = yesno;
ushell = "/bin/csh";