diff options
author | ache <ache@FreeBSD.org> | 1994-10-21 04:43:07 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-10-21 04:43:07 +0000 |
commit | d18ca621f2a555d2977216023f37c6b302ba6141 (patch) | |
tree | 6b0d47eb794fb54237e2a63cf7782b3025144f65 | |
parent | 2cf5e51b10ea71a17569a2a0c7c898f9eb6934ef (diff) | |
download | FreeBSD-src-d18ca621f2a555d2977216023f37c6b302ba6141.zip FreeBSD-src-d18ca621f2a555d2977216023f37c6b302ba6141.tar.gz |
Second time bugfix, please be carefully.
Use dialog functions in Fatal only if dialog_active, else
use fprintf(stderr, because it may be called before dialog
initialization
-rw-r--r-- | sbin/sysinstall/utils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/sysinstall/utils.c b/sbin/sysinstall/utils.c index 662ef4c..5a4e9e5 100644 --- a/sbin/sysinstall/utils.c +++ b/sbin/sysinstall/utils.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: utils.c,v 1.4 1994/10/20 19:30:56 ache Exp $ + * $Id: utils.c,v 1.5 1994/10/21 02:14:54 phk Exp $ * */ @@ -50,9 +50,12 @@ Fatal(char *fmt, ...) vsnprintf(p, 2048, fmt, ap); va_end(ap); sprintf(p+strlen(p),"\nErrno= %d, %s.",i,strerror(i)); - dialog_msgbox("Fatal", p, 12, 75, 1); + if (dialog_active) { + dialog_msgbox("Fatal", p, 12, 75, 1); + end_dialog(); + } else + fprintf(stderr, "Fatal -- %s", p); free(p); - end_dialog(); exit(7); } |