From 4bc5a2dda3322237aff9d99c18e2080f78559ba4 Mon Sep 17 00:00:00 2001 From: jkh Date: Mon, 29 May 1995 11:01:42 +0000 Subject: 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. --- usr.sbin/sysinstall/ufs.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'usr.sbin/sysinstall/ufs.c') diff --git a/usr.sbin/sysinstall/ufs.c b/usr.sbin/sysinstall/ufs.c index 1fd9d4e..55a2701 100644 --- a/usr.sbin/sysinstall/ufs.c +++ b/usr.sbin/sysinstall/ufs.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: ufs.c,v 1.1 1995/05/27 10:39:04 jkh Exp $ + * $Id: ufs.c,v 1.2 1995/05/27 23:39:35 phk Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -44,17 +44,19 @@ */ #include "sysinstall.h" +#include +#include -Boolean -mediaInitUFS(Device *dev) -{ - return TRUE; -} +/* No init or shutdown routines necessary - all done in mediaSetUFS() */ int mediaGetUFS(char *file) { - return -1; -} + char buf[PATH_MAX]; -/* UFS has no Shutdown routine since this is handled at the device level */ + snprintf(buf, PATH_MAX, "%s/%s", (char *)mediaDevice->private, file); + if (!access(buf, R_OK)) + return open(buf, O_RDONLY); + snprintf(buf, PATH_MAX, "%s/dists/%s", (char *)mediaDevice->private, file); + return open(buf, O_RDONLY); +} -- cgit v1.1