summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/ufs.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-12-22 12:31:26 +0000
committerjkh <jkh@FreeBSD.org>1998-12-22 12:31:26 +0000
commite72da228343024d66a2d2be92429e6bfec4f6fa1 (patch)
tree705855b9e9773f3964f64d41928812ef61a6c9f4 /usr.sbin/sysinstall/ufs.c
parent91bd0e66beb40a53efaf61eaad295aaf08f1384f (diff)
downloadFreeBSD-src-e72da228343024d66a2d2be92429e6bfec4f6fa1.zip
FreeBSD-src-e72da228343024d66a2d2be92429e6bfec4f6fa1.tar.gz
Collapse the "get" code substantially by combining common functions.
Also make mountpoint for each media type easier to change. Also reshuffled some menus for easier usage.
Diffstat (limited to 'usr.sbin/sysinstall/ufs.c')
-rw-r--r--usr.sbin/sysinstall/ufs.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/usr.sbin/sysinstall/ufs.c b/usr.sbin/sysinstall/ufs.c
index 8f61cbe..73c0667 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.12 1997/02/22 14:12:35 peter Exp $
+ * $Id: ufs.c,v 1.13 1998/09/14 19:14:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -45,19 +45,5 @@
FILE *
mediaGetUFS(Device *dev, char *file, Boolean probe)
{
- char buf[PATH_MAX];
-
- if (isDebug())
- msgDebug("Request for %s from UFS\n", file);
- snprintf(buf, PATH_MAX, "%s/%s", (char *)dev->private, file);
- if (file_readable(buf))
- return fopen(buf, "r");
- snprintf(buf, PATH_MAX, "%s/dists/%s", (char *)dev->private, file);
- if (file_readable(buf))
- return fopen(buf, "r");
- snprintf(buf, PATH_MAX, "%s/%s/%s", (char *)dev->private, variable_get(VAR_RELNAME), file);
- if (file_readable(buf))
- return fopen(buf, "r");
- snprintf(buf, PATH_MAX, "%s/%s/dists/%s", (char *)dev->private, variable_get(VAR_RELNAME), file);
- return fopen(buf, "r");
+ return mediaGenericGet((char *)dev->private, file);
}
OpenPOWER on IntegriCloud