Better error checking in helpfile expander.
Tart up some of the output a little.
This commit is contained in:
parent
e63b920bac
commit
9e15f9a31f
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.63 1996/07/09 16:28:59 jkh Exp $
|
||||
* $Id: dist.c,v 1.64 1996/07/09 16:57:14 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -461,7 +461,7 @@ distExtract(char *parent, Distribution *me)
|
||||
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
|
||||
if (!seconds)
|
||||
seconds = 1;
|
||||
msgInfo("%d bytes read from %s dist, chunk %d of %d @ %-4.1f KB/sec.",
|
||||
msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %4.1f KB/sec.",
|
||||
total, dist, chunk + 1, numchunks, (chunktotal / seconds) / 1024.0);
|
||||
retval = write(fd2, buf, n);
|
||||
if (retval != n) {
|
||||
|
@ -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.35 1996/06/08 09:08:43 jkh Exp $
|
||||
* $Id: msg.c,v 1.36 1996/06/14 14:33:57 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -319,8 +319,6 @@ msgWeHaveOutput(char *fmt, ...)
|
||||
msgDebug("Notify: %s\n", errstr);
|
||||
dialog_clear();
|
||||
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
|
||||
if (OnVTY)
|
||||
msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
|
||||
}
|
||||
|
||||
/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: package.c,v 1.41 1996/07/08 08:54:32 jkh Exp $
|
||||
* $Id: package.c,v 1.42 1996/07/09 14:28:20 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -155,7 +155,7 @@ package_extract(Device *dev, char *name, Boolean depended)
|
||||
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
|
||||
if (!seconds)
|
||||
seconds = 1;
|
||||
msgInfo("%d bytes read from package %s @ %.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
|
||||
msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
|
||||
/* Write it out */
|
||||
if (write(pfd[1], buf, i) != i) {
|
||||
msgInfo("Write failure to pkg_add! Package may be corrupt.");
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.60 1996/07/05 08:36:02 jkh Exp $
|
||||
* $Id: system.c,v 1.61 1996/07/08 08:54:34 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -47,7 +47,7 @@ expand(char *fname)
|
||||
{
|
||||
Mkdir(DOC_TMP_DIR);
|
||||
unlink(DOC_TMP_FILE);
|
||||
if (vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
|
||||
if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
|
||||
return NULL;
|
||||
return DOC_TMP_FILE;
|
||||
}
|
||||
@ -249,8 +249,6 @@ vsystem(char *fmt, ...)
|
||||
else if (!pid) { /* Junior */
|
||||
(void)sigsetmask(omask);
|
||||
if (DebugFD != -1) {
|
||||
if (OnVTY && isDebug() && RunningAsInit)
|
||||
msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
|
||||
dup2(DebugFD, 0);
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
|
@ -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.35 1996/06/08 09:08:43 jkh Exp $
|
||||
* $Id: msg.c,v 1.36 1996/06/14 14:33:57 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -319,8 +319,6 @@ msgWeHaveOutput(char *fmt, ...)
|
||||
msgDebug("Notify: %s\n", errstr);
|
||||
dialog_clear();
|
||||
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
|
||||
if (OnVTY)
|
||||
msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
|
||||
}
|
||||
|
||||
/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.60 1996/07/05 08:36:02 jkh Exp $
|
||||
* $Id: system.c,v 1.61 1996/07/08 08:54:34 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -47,7 +47,7 @@ expand(char *fname)
|
||||
{
|
||||
Mkdir(DOC_TMP_DIR);
|
||||
unlink(DOC_TMP_FILE);
|
||||
if (vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
|
||||
if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
|
||||
return NULL;
|
||||
return DOC_TMP_FILE;
|
||||
}
|
||||
@ -249,8 +249,6 @@ vsystem(char *fmt, ...)
|
||||
else if (!pid) { /* Junior */
|
||||
(void)sigsetmask(omask);
|
||||
if (DebugFD != -1) {
|
||||
if (OnVTY && isDebug() && RunningAsInit)
|
||||
msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
|
||||
dup2(DebugFD, 0);
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: dist.c,v 1.63 1996/07/09 16:28:59 jkh Exp $
|
||||
* $Id: dist.c,v 1.64 1996/07/09 16:57:14 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -461,7 +461,7 @@ distExtract(char *parent, Distribution *me)
|
||||
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
|
||||
if (!seconds)
|
||||
seconds = 1;
|
||||
msgInfo("%d bytes read from %s dist, chunk %d of %d @ %-4.1f KB/sec.",
|
||||
msgInfo("%10d bytes read from %s dist, chunk %2d of %2d @ %4.1f KB/sec.",
|
||||
total, dist, chunk + 1, numchunks, (chunktotal / seconds) / 1024.0);
|
||||
retval = write(fd2, buf, n);
|
||||
if (retval != n) {
|
||||
|
@ -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.35 1996/06/08 09:08:43 jkh Exp $
|
||||
* $Id: msg.c,v 1.36 1996/06/14 14:33:57 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -319,8 +319,6 @@ msgWeHaveOutput(char *fmt, ...)
|
||||
msgDebug("Notify: %s\n", errstr);
|
||||
dialog_clear();
|
||||
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
|
||||
if (OnVTY)
|
||||
msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
|
||||
}
|
||||
|
||||
/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: package.c,v 1.41 1996/07/08 08:54:32 jkh Exp $
|
||||
* $Id: package.c,v 1.42 1996/07/09 14:28:20 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -155,7 +155,7 @@ package_extract(Device *dev, char *name, Boolean depended)
|
||||
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
|
||||
if (!seconds)
|
||||
seconds = 1;
|
||||
msgInfo("%d bytes read from package %s @ %.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
|
||||
msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
|
||||
/* Write it out */
|
||||
if (write(pfd[1], buf, i) != i) {
|
||||
msgInfo("Write failure to pkg_add! Package may be corrupt.");
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last program in the `sysinstall' line - the next
|
||||
* generation being essentially a complete rewrite.
|
||||
*
|
||||
* $Id: system.c,v 1.60 1996/07/05 08:36:02 jkh Exp $
|
||||
* $Id: system.c,v 1.61 1996/07/08 08:54:34 jkh Exp $
|
||||
*
|
||||
* Jordan Hubbard
|
||||
*
|
||||
@ -47,7 +47,7 @@ expand(char *fname)
|
||||
{
|
||||
Mkdir(DOC_TMP_DIR);
|
||||
unlink(DOC_TMP_FILE);
|
||||
if (vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
|
||||
if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE))
|
||||
return NULL;
|
||||
return DOC_TMP_FILE;
|
||||
}
|
||||
@ -249,8 +249,6 @@ vsystem(char *fmt, ...)
|
||||
else if (!pid) { /* Junior */
|
||||
(void)sigsetmask(omask);
|
||||
if (DebugFD != -1) {
|
||||
if (OnVTY && isDebug() && RunningAsInit)
|
||||
msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
|
||||
dup2(DebugFD, 0);
|
||||
dup2(DebugFD, 1);
|
||||
dup2(DebugFD, 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user