From 9f3e704a535d4e3a76f3791a97954f7283058cb3 Mon Sep 17 00:00:00 2001 From: jkh Date: Mon, 12 Oct 1998 23:45:07 +0000 Subject: Make floppy media code more generic so that fixit floppy can use it. --- usr.sbin/sysinstall/floppy.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'usr.sbin/sysinstall/floppy.c') diff --git a/usr.sbin/sysinstall/floppy.c b/usr.sbin/sysinstall/floppy.c index ec87289..87974dd 100644 --- a/usr.sbin/sysinstall/floppy.c +++ b/usr.sbin/sysinstall/floppy.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: floppy.c,v 1.28 1998/02/10 18:31:22 jkh Exp $ + * $Id: floppy.c,v 1.29 1998/07/18 09:42:00 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -62,11 +62,12 @@ mediaInitFloppy(Device *dev) { struct msdosfs_args dosargs; struct ufs_args u_args; - char *mountpoint = "/dist"; + char *mountpoint; if (floppyMounted) return TRUE; + mountpoint = (char *)dev->private; if (Mkdir(mountpoint)) { msgConfirm("Unable to make %s directory mountpoint for %s!", mountpoint, dev->devname); return FALSE; @@ -110,10 +111,10 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe) FILE *fp; int nretries = 5; - snprintf(buf, PATH_MAX, "/dist/%s", file); + snprintf(buf, PATH_MAX, "%s/%s", (char *)dev->private, file); if (isDebug()) - msgDebug("Request for %s from floppy on /dist, probe is %d.\n", buf, probe); + msgDebug("Request for %s from floppy on %s, probe is %d.\n", buf, (char *)dev->private, probe); if (!file_readable(buf)) { if (probe) return NULL; @@ -137,7 +138,7 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe) void mediaShutdownFloppy(Device *dev) { - char *mountpoint = "/dist"; + char *mountpoint = (char *)dev->private; if (floppyMounted) { if (unmount(mountpoint, MNT_FORCE) != 0) -- cgit v1.1