aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>2001-09-11 20:42:07 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>2001-09-11 20:42:07 +0000
commit30b7cb5e9f30eddd6fbac1399eea5ef44bd40cb0 (patch)
tree7dbc73eaf0389fa4bcdbde4f461b7faef2c2e249 /usr.sbin/sade
parentd44ddba96c0c98edac3e1f29341a7b64fed81965 (diff)
downloadsrc-30b7cb5e9f30eddd6fbac1399eea5ef44bd40cb0.tar.gz
src-30b7cb5e9f30eddd6fbac1399eea5ef44bd40cb0.zip
Return the *right* error codes for yes/no questions when non-interactive.
Submitted by: Alan Judge <Alan.Judge@eircom.net>
Notes
Notes: svn path=/head/; revision=83351
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/msg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c
index d54c65268abc..4625ce2f7752 100644
--- a/usr.sbin/sade/msg.c
+++ b/usr.sbin/sade/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;