summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/ufs.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/sysinstall/ufs.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/sysinstall/ufs.c')
-rw-r--r--usr.sbin/sysinstall/ufs.c20
1 files changed, 11 insertions, 9 deletions
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 <sys/fcntl.h>
+#include <sys/param.h>
-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);
+}
OpenPOWER on IntegriCloud