summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/msg.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-23 02:41:18 +0000
committerjkh <jkh@FreeBSD.org>1995-05-23 02:41:18 +0000
commit69df29fff8d1ce7a7a944f0d6431cebb54fca45e (patch)
tree1be6c68d1b91dc89c4abcef6f02b842e08f96593 /usr.sbin/sysinstall/msg.c
parentc479e492f4696b134bb3a6de2a2b0ac949a5ac63 (diff)
downloadFreeBSD-src-69df29fff8d1ce7a7a944f0d6431cebb54fca45e.zip
FreeBSD-src-69df29fff8d1ce7a7a944f0d6431cebb54fca45e.tar.gz
1. Bring in the first cut of Poul's ftp routines. We still don't
use them yet, but it's close (we're working on the last wrinkles in the CD install for now). 2. Complete the CDROM installation strategy code. 3. Simplify the distribtuion loading code. 4. General error message cleanup. 5. Write the /etc/fstab file now and split those routines into config.c 6. Clean up the menus a little more.
Diffstat (limited to 'usr.sbin/sysinstall/msg.c')
-rw-r--r--usr.sbin/sysinstall/msg.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c
index c78621d..b2f4baf 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.21 1995/05/20 19:12:12 phk Exp $
+ * $Id: msg.c,v 1.22 1995/05/22 14:10:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -73,21 +73,32 @@ msgInfo(char *fmt, ...)
{
va_list args;
char *errstr;
- int attrs;
+ int i, attrs;
+ char line[81];
+ attrs = getattrs(stdscr);
/* NULL is a special convention meaning "erase the old stuff" */
if (!fmt) {
move(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0);
+ attrset(A_REVERSE);
clrtoeol();
+ attrset(attrs);
return;
}
errstr = (char *)safe_malloc(FILENAME_MAX);
va_start(args, fmt);
vsnprintf(errstr, FILENAME_MAX, fmt, args);
va_end(args);
- attrs = getattrs(stdscr);
- attrset(A_NORMAL);
- mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, errstr);
+ memset(line, ' ', 80);
+ for (i = 0; i < 80; i++) {
+ if (errstr[i])
+ line[i] = errstr[i];
+ else
+ break;
+ }
+ line[80] = '\0';
+ attrset(A_REVERSE);
+ mvaddstr(OnVTY ? VTY_STATLINE : TTY_STATLINE, 0, line);
attrset(attrs);
refresh();
if (OnVTY) {
@@ -303,3 +314,24 @@ msgDebug(char *fmt, ...)
write(DebugFD, dbg, strlen(dbg));
free(dbg);
}
+
+/* Tell the user there's some output to go look at */
+void
+msgWeHaveOutput(char *fmt, ...)
+{
+ va_list args;
+ char *errstr;
+
+ errstr = (char *)safe_malloc(FILENAME_MAX);
+ va_start(args, fmt);
+ vsnprintf(errstr, FILENAME_MAX, fmt, args);
+ va_end(args);
+ use_helpline(NULL);
+ use_helpfile(NULL);
+ msgDebug("Notify: %s\n", errstr);
+ dialog_clear();
+ 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");
+}
OpenPOWER on IntegriCloud