Date: Sun, 21 Mar 1999 13:55:49 -0600 (CST) From: Chris Costello <chris@holly.dyndns.org> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10711: [Patch] sysinstall does not use the proper fs name for 'file system' option Message-ID: <199903211955.NAA04416@holly.dyndns.org>
next in thread | raw e-mail | index | archive | help
>Number: 10711
>Category: bin
>Synopsis: [Patch] sysinstall does not use the proper fs name for 'file system' option
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Mar 21 12:00:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Chris Costello
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:
FreeBSD 4.0-CURRENT, cvsupped March 20.
>Description:
When installing, for example, packages, from a mounted file system,
sysinstall assumes the file system is ufs.
>How-To-Repeat:
Insert a CD with the packages `tree'.
Run sysinstall.
Under packages, select, for media, "File System" and put the mount
point of your CDROM where asked.
When installing a package, it says 'installing [...] from ufs'
>Fix:
Patch for media.c:
--- media.c.orig Sun Mar 21 13:41:59 1999
+++ media.c Sun Mar 21 13:44:35 1999
@@ -39,6 +39,7 @@
#include <netdb.h>
#include <sys/socket.h>
#include <sys/param.h>
+#include <sys/mount.h>
#include <sys/errno.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
@@ -440,6 +441,7 @@
mediaSetUFS(dialogMenuItem *self)
{
static Device ufsDevice;
+ struct statfs st;
char *cp;
mediaClose();
@@ -448,7 +450,10 @@
"containing the FreeBSD distribution files:", 0);
if (!cp)
return DITEM_FAILURE;
- strcpy(ufsDevice.name, "ufs");
+
+ if (statfs(cp, &st))
+ return DITEM_FAILURE;
+ strcpy(ufsDevice.name, st.f_fstypename);
ufsDevice.type = DEVICE_TYPE_UFS;
ufsDevice.init = dummyInit;
ufsDevice.get = mediaGetUFS;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903211955.NAA04416>
