summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/misc.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-29 11:01:42 +0000
committerjkh <jkh@FreeBSD.org>1995-05-29 11:01:42 +0000
commit4bc5a2dda3322237aff9d99c18e2080f78559ba4 (patch)
treef98b313f289088a0f9384387c68ec7516031cc7e /usr.sbin/sade/misc.c
parent56df30b7c63bbeceb73f75bc2eb45c0e1c271e5e (diff)
downloadFreeBSD-src-4bc5a2dda3322237aff9d99c18e2080f78559ba4.zip
FreeBSD-src-4bc5a2dda3322237aff9d99c18e2080f78559ba4.tar.gz
Sync up my work for the night. This should implement ALL possible
installation methods and provide a fairly robust set of menu options. This should also fix a few more bugs on Poul-Henning's latest gripe list.
Diffstat (limited to 'usr.sbin/sade/misc.c')
-rw-r--r--usr.sbin/sade/misc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index a2ab20f..f1b8066 100644
--- a/usr.sbin/sade/misc.c
+++ b/usr.sbin/sade/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.8 1995/05/23 18:06:15 jkh Exp $
+ * $Id: misc.c,v 1.9 1995/05/25 01:22:19 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -183,7 +183,8 @@ Mkdir(char *ipath, void *data)
return 0;
path = strdup(ipath);
- msgDebug("mkdir(%s)\n", path);
+ if (isDebug())
+ msgDebug("mkdir(%s)\n", path);
p = path;
if (p[0] == '/') /* Skip leading '/'. */
++p;
@@ -198,7 +199,8 @@ Mkdir(char *ipath, void *data)
msgConfirm("Couldn't stat directory %s: %s", path, strerror(errno));
return 1;
}
- msgDebug("mkdir(%s..)\n", path);
+ if (isDebug())
+ msgDebug("mkdir(%s..)\n", path);
if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
msgConfirm("Couldn't create directory %s: %s", path,strerror(errno));
return 1;
@@ -231,7 +233,9 @@ Mount(char *mountp, void *dev)
msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
return 1;
}
- msgDebug("mount %s %s\n", device, mountpoint);
+ if (isDebug())
+ msgDebug("mount %s %s\n", device, mountpoint);
+ bzero(&ufsargs, sizeof(ufsargs));
ufsargs.fspec = device;
if (mount(MOUNT_UFS, mountpoint, 0, (caddr_t)&ufsargs) == -1) {
msgConfirm("Error mounting %s on %s : %s\n", device, mountpoint, strerror(errno));
OpenPOWER on IntegriCloud