Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Handle empty input gracefully by simply jum...
details: https://anonhg.NetBSD.org/src/rev/98933a8dd378
branches: trunk
changeset: 805822:98933a8dd378
user: snj <snj%NetBSD.org@localhost>
date: Tue Jan 20 21:51:05 2015 +0000
description:
Handle empty input gracefully by simply jumping back to the config menu.
diffstat:
usr.sbin/sysinst/configmenu.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r 1b7b8c69e772 -r 98933a8dd378 usr.sbin/sysinst/configmenu.c
--- a/usr.sbin/sysinst/configmenu.c Tue Jan 20 21:42:36 2015 +0000
+++ b/usr.sbin/sysinst/configmenu.c Tue Jan 20 21:51:05 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: configmenu.c,v 1.2 2014/08/03 16:09:38 martin Exp $ */
+/* $NetBSD: configmenu.c,v 1.3 2015/01/20 21:51:05 snj Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -252,10 +252,12 @@
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";
Home |
Main Index |
Thread Index |
Old Index