summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/media.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-28 01:07:27 +0000
committerjkh <jkh@FreeBSD.org>1996-04-28 01:07:27 +0000
commit757f0d4140ba92ac2ff7e00fc840bf99ecee5f21 (patch)
treee29bd26ab9f65572bd124e188a21b4a1744bcb54 /usr.sbin/sysinstall/media.c
parent7a8e35fbab581e26b8a60eeea29077d5d66b9e11 (diff)
downloadFreeBSD-src-757f0d4140ba92ac2ff7e00fc840bf99ecee5f21.zip
FreeBSD-src-757f0d4140ba92ac2ff7e00fc840bf99ecee5f21.tar.gz
Move some of functions around in order to make this stuff easier
to work on.
Diffstat (limited to 'usr.sbin/sysinstall/media.c')
-rw-r--r--usr.sbin/sysinstall/media.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index a69e7df..d020b24 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: media.c,v 1.35 1996/04/26 18:19:34 jkh Exp $
+ * $Id: media.c,v 1.36 1996/04/28 00:37:33 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -63,9 +63,11 @@ cdromHook(dialogMenuItem *self)
char *
cpioVerbosity()
{
- if (!strcmp(variable_get(VAR_CPIO_VERBOSITY), "high"))
+ char *cp = variable_get(VAR_CPIO_VERBOSITY);
+
+ if (cp && !strcmp(cp, "high"))
return "-v";
- else if (!strcmp(variable_get(VAR_CPIO_VERBOSITY), "medium"))
+ else if (cp && !strcmp(cp, "medium"))
return "-V";
return "";
}
@@ -466,7 +468,10 @@ mediaExtractDist(char *dir, int fd)
close(1); open("/dev/null", O_WRONLY);
dup2(1, 2);
}
- i = execl("/stand/cpio", "/stand/cpio", "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), 0);
+ if (strlen(cpioVerbosity()))
+ i = execl("/stand/cpio", "/stand/cpio", "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), 0);
+ else
+ i = execl("/stand/cpio", "/stand/cpio", "-idum", "--block-size", mediaTapeBlocksize(), 0);
if (isDebug())
msgDebug("/stand/cpio command returns %d status\n", i);
exit(i);
OpenPOWER on IntegriCloud