summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/misc.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-23 18:06:16 +0000
committerjkh <jkh@FreeBSD.org>1995-05-23 18:06:16 +0000
commit1503917ec9b489a39b5b6852d0dd4da1e98df07a (patch)
tree8166ea8807c2f301839ed0dfc6658a8942d1f428 /usr.sbin/sade/misc.c
parent44080e30b5035fd5c72753df7b50234d49db0c84 (diff)
downloadFreeBSD-src-1503917ec9b489a39b5b6852d0dd4da1e98df07a.zip
FreeBSD-src-1503917ec9b489a39b5b6852d0dd4da1e98df07a.tar.gz
Add my first cut at TCP/IP device configuration. If this works, the
ftp installation method should now function. We'll know as soon as my make release builds the floppies. I'm just committing this out of my release tree now so that it doesn't get clobbered again.
Diffstat (limited to 'usr.sbin/sade/misc.c')
-rw-r--r--usr.sbin/sade/misc.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index 5fc29af..197a9ec 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.6 1995/05/18 16:53:53 jkh Exp $
+ * $Id: misc.c,v 1.7 1995/05/18 16:57:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -40,6 +40,7 @@
#include "sysinstall.h"
#include <ctype.h>
+#include <unistd.h>
#include <sys/stat.h>
#include <sys/errno.h>
#include <sys/file.h>
@@ -176,8 +177,12 @@ Mkdir(char *ipath, void *data)
{
struct stat sb;
int final=0;
- char *p, *path = strdup(ipath);
+ char *p, *path;
+ if (access(ipath, R_OK) == 0)
+ return 0;
+
+ path = strdup(ipath);
msgDebug("mkdir(%s)\n", path);
p = path;
if (p[0] == '/') /* Skip leading '/'. */
@@ -222,9 +227,10 @@ Mount(char *mountp, void *dev)
}
memset(&ufsargs,0,sizeof ufsargs);
- if (access(mountpoint, R_OK))
- Mkdir(mountpoint, NULL);
-
+ if (Mkdir(mountpoint, NULL)) {
+ msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
+ return 1;
+ }
msgDebug("mount %s %s\n", device, mountpoint);
ufsargs.fspec = device;
if (mount(MOUNT_UFS, mountpoint, 0, (caddr_t)&ufsargs) == -1) {
OpenPOWER on IntegriCloud