summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>2001-09-11 20:42:07 +0000
committerjkh <jkh@FreeBSD.org>2001-09-11 20:42:07 +0000
commit3953352b963c1972e06e6922a14646f303367467 (patch)
tree7dbc73eaf0389fa4bcdbde4f461b7faef2c2e249 /usr.sbin
parenta955db2e6b8ec6194b1bf6f2fb937500c05aea10 (diff)
downloadFreeBSD-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')
-rw-r--r--usr.sbin/sade/msg.c8
-rw-r--r--usr.sbin/sysinstall/msg.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c
index d54c652..4625ce2 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;
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;
OpenPOWER on IntegriCloud