diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-08 06:06:30 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-08 06:06:30 +0000 |
commit | 7440d1ae5c074c0c8ed8018cd10e429b279d8745 (patch) | |
tree | 0f8452edfa4c92d9e7ad62938d4ad2e891ccdbef /usr.sbin/sade/msg.c | |
parent | 021b1e61da72a756bc8f87b139948c264ab03d85 (diff) | |
download | FreeBSD-src-7440d1ae5c074c0c8ed8018cd10e429b279d8745.zip FreeBSD-src-7440d1ae5c074c0c8ed8018cd10e429b279d8745.tar.gz |
Ok, we should now create all filesystems, mount them and extract the
cpio floppy at this point.
Diffstat (limited to 'usr.sbin/sade/msg.c')
-rw-r--r-- | usr.sbin/sade/msg.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c index 70cf576..d8dc84b 100644 --- a/usr.sbin/sade/msg.c +++ b/usr.sbin/sade/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.7 1995/05/07 03:38:01 jkh Exp $ + * $Id: msg.c,v 1.8 1995/05/07 05:58:57 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -53,9 +53,8 @@ msgYap(char *fmt, ...) int attrs; errstr = (char *)safe_malloc(FILENAME_MAX); - errstr[0] = '\0'; va_start(args, fmt); - vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args); + vsnprintf(errstr, FILENAME_MAX, fmt, args); va_end(args); attrs = getattrs(stdscr); attrset(A_REVERSE); @@ -74,9 +73,8 @@ msgInfo(char *fmt, ...) int attrs; errstr = (char *)safe_malloc(FILENAME_MAX); - errstr[0] = '\0'; va_start(args, fmt); - vsnprintf((char *)(errstr + strlen(errstr)), FILENAME_MAX, fmt, args); + vsnprintf(errstr, FILENAME_MAX, fmt, args); va_end(args); attrs = getattrs(stdscr); attrset(A_NORMAL); @@ -240,3 +238,18 @@ msgGetInput(char *buf, char *fmt, ...) return NULL; } +/* Write something to the debugging port */ +void +msgDebug(char *fmt, ...) +{ + va_list args; + char *dbg; + + dbg = (char *)safe_malloc(FILENAME_MAX); + strcpy(dbg, "DEBUG: "); + va_start(args, fmt); + vsnprintf((char *)(dbg + strlen(dbg)), FILENAME_MAX, fmt, args); + va_end(args); + write(DebugFD, dbg, strlen(dbg)); + free(dbg); +} |