summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/msg.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-07 10:34:59 +0000
committerpeter <peter@FreeBSD.org>1995-12-07 10:34:59 +0000
commit03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6 (patch)
tree3d31cd880ab6a9af9ad3ab3c6313d70e1c542d60 /usr.sbin/sysinstall/msg.c
parent53a232b78efd4ef6c84ff8047a3a43c3d8cf0a25 (diff)
downloadFreeBSD-src-03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6.zip
FreeBSD-src-03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6.tar.gz
Update the -current sources from the 2.1 branch.
Approved (in spirit) by: jkh
Diffstat (limited to 'usr.sbin/sysinstall/msg.c')
-rw-r--r--usr.sbin/sysinstall/msg.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c
index 088da89..ae5e3f3 100644
--- a/usr.sbin/sysinstall/msg.c
+++ b/usr.sbin/sysinstall/msg.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: msg.c,v 1.28.2.2 1995/06/02 15:31:31 jkh Exp $
+ * $Id: msg.c,v 1.29.2.8 1995/10/22 21:38:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -52,9 +52,9 @@
Boolean
isDebug(void)
{
- if (OptFlags & OPT_DEBUG)
- return TRUE;
- return FALSE;
+ char *cp;
+
+ return (cp = variable_get(VAR_DEBUG)) && strcmp(cp, "no");
}
/* Whack up an informational message on the status line, in stand-out */
@@ -216,7 +216,7 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- msgDebug("Switching back to VTY 0\n");
+ msgDebug("Switching back to VTY1\n");
ioctl(0, VT_ACTIVATE, 1);
msgInfo(NULL);
}
@@ -264,7 +264,7 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- msgDebug("Switching back to VTY 0\n");
+ msgDebug("Switching back to VTY1\n");
ioctl(0, VT_ACTIVATE, 1); /* Switch back */
msgInfo(NULL);
}
@@ -298,7 +298,7 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0';
w = dupwin(newscr);
if (OnVTY) {
- msgDebug("Switching back to VTY 0\n");
+ msgDebug("Switching back to VTY1\n");
ioctl(0, VT_ACTIVATE, 1); /* Switch back */
msgInfo(NULL);
}
@@ -349,5 +349,20 @@ msgWeHaveOutput(char *fmt, ...)
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
free(errstr);
if (OnVTY)
- msgInfo("Command output is on debugging screen - type ALT-F2 to see it");
+ msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
+}
+
+/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
+int
+msgSimpleConfirm(char *str)
+{
+ msgConfirm(str);
+ return RET_SUCCESS;
+}
+
+int
+msgSimpleNotify(char *str)
+{
+ msgNotify(str);
+ return RET_SUCCESS;
}
OpenPOWER on IntegriCloud