diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-18 16:53:53 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-18 16:53:53 +0000 |
commit | 136393f06efc65443705099027f36e7cad69a984 (patch) | |
tree | 56b23706ed0513e6754f73d6656caaacf291a6c4 /usr.sbin/sade/misc.c | |
parent | b4eac5ff3c564b4ae9fc0198487e5041de8a4e66 (diff) | |
download | FreeBSD-src-136393f06efc65443705099027f36e7cad69a984.zip FreeBSD-src-136393f06efc65443705099027f36e7cad69a984.tar.gz |
I had the arguments to Mount() backwards. Argh.
Diffstat (limited to 'usr.sbin/sade/misc.c')
-rw-r--r-- | usr.sbin/sade/misc.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c index 5084c88..e8c1ae6 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.4 1995/05/08 21:39:39 jkh Exp $ + * $Id: misc.c,v 1.5 1995/05/16 11:37:22 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -206,15 +206,20 @@ Mkdir(char *ipath, void *data) } int -Mount(char *device, void *data) +Mount(char *mountp, void *dev) { struct ufs_args ufsargs; + char device[80]; char mountpoint[FILENAME_MAX]; - strcpy(mountpoint, "/mnt"); - if (data) - sprintf(mountpoint + 4, "/%s", (char *)data); - + if (*((char *)dev) != "/") { + sprintf(device, "/mnt/dev/%s", dev); + sprintf(mountpoint, "/mnt%s", mountp); + } + else { + strcpy(device, dev); + strcpy(mountpoint, mountp); + } memset(&ufsargs,0,sizeof ufsargs); if (access(mountpoint, R_OK)) |