Handle empty input gracefully by simply jumping back to the config menu.
This commit is contained in:
parent
a3c36dcba4
commit
362cd6ee40
|
@ -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 @@ 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";
|
||||
|
|
Loading…
Reference in New Issue