diff options
author | jkh <jkh@FreeBSD.org> | 2001-09-11 20:42:07 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2001-09-11 20:42:07 +0000 |
commit | 3953352b963c1972e06e6922a14646f303367467 (patch) | |
tree | 7dbc73eaf0389fa4bcdbde4f461b7faef2c2e249 /usr.sbin/sysinstall | |
parent | a955db2e6b8ec6194b1bf6f2fb937500c05aea10 (diff) | |
download | FreeBSD-src-3953352b963c1972e06e6922a14646f303367467.zip FreeBSD-src-3953352b963c1972e06e6922a14646f303367467.tar.gz |
Return the *right* error codes for yes/no questions when non-interactive.
Submitted by: Alan Judge <Alan.Judge@eircom.net>
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r-- | usr.sbin/sysinstall/msg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c index d54c652..4625ce2 100644 --- a/usr.sbin/sysinstall/msg.c +++ b/usr.sbin/sysinstall/msg.c @@ -218,7 +218,7 @@ msgNotify(char *fmt, ...) dialog_msgbox(NULL, errstr, -1, -1, 0); } -/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */ +/* Put up a message in a popup yes/no box and return 0 for YES, 1 for NO */ int msgYesNo(char *fmt, ...) { @@ -238,13 +238,13 @@ msgYesNo(char *fmt, ...) msgInfo(NULL); } if (variable_get(VAR_NONINTERACTIVE)) - return 1; /* If non-interactive, return YES all the time */ + return 0; /* If non-interactive, return YES all the time */ ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); restorescr(w); return ret; } -/* Put up a message in a popup no/yes box and return 1 for YES, 0 for NO */ +/* Put up a message in a popup no/yes box and return 0 for YES, 1 for NO */ int msgNoYes(char *fmt, ...) { @@ -264,7 +264,7 @@ msgNoYes(char *fmt, ...) msgInfo(NULL); } if (variable_get(VAR_NONINTERACTIVE)) - return 0; /* If non-interactive, return NO all the time */ + return 1; /* If non-interactive, return NO all the time */ ret = dialog_noyes("User Confirmation Requested", errstr, -1, -1); restorescr(w); return ret; |