summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/ufs.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-07 10:34:59 +0000
committerpeter <peter@FreeBSD.org>1995-12-07 10:34:59 +0000
commit03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6 (patch)
tree3d31cd880ab6a9af9ad3ab3c6313d70e1c542d60 /usr.sbin/sysinstall/ufs.c
parent53a232b78efd4ef6c84ff8047a3a43c3d8cf0a25 (diff)
downloadFreeBSD-src-03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6.zip
FreeBSD-src-03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6.tar.gz
Update the -current sources from the 2.1 branch.
Approved (in spirit) by: jkh
Diffstat (limited to 'usr.sbin/sysinstall/ufs.c')
-rw-r--r--usr.sbin/sysinstall/ufs.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/sysinstall/ufs.c b/usr.sbin/sysinstall/ufs.c
index 5f68366..0176bac 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.4.2.2 1995/06/05 12:04:09 jkh Exp $
+ * $Id: ufs.c,v 1.5.2.4 1995/10/22 01:33:02 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -50,13 +50,20 @@
/* No init or shutdown routines necessary - all done in mediaSetUFS() */
int
-mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetUFS(Device *dev, char *file, Boolean tentative)
{
char buf[PATH_MAX];
+ msgDebug("Request for %s from UFS\n", file);
snprintf(buf, PATH_MAX, "%s/%s", dev->private, file);
- if (!access(buf, R_OK))
+ if (file_readable(buf))
return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "%s/dists/%s", dev->private, file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "%s/%s/%s", dev->private, variable_get(VAR_RELNAME), file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "%s/%s/dists/%s", dev->private, variable_get(VAR_RELNAME), file);
return open(buf, O_RDONLY);
}
OpenPOWER on IntegriCloud