Bug 10711 - [Patch] sysinstall does not use the proper fs name for 'file system' option
Summary: [Patch] sysinstall does not use the proper fs name for 'file system' option
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: jkh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-03-21 20:00 UTC by Chris Costello
Modified: 1999-05-07 06:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Costello 1999-03-21 20:00:01 UTC
	When installing, for example, packages, from a mounted file system,
	sysinstall assumes the file system is ufs.

Fix: Patch for media.c:



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;--5qeZczMLtW2yJ6ky3efC098Z8XEn0cZMBYOApGeMcXtBbIqy
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 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;
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'
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 1999-03-23 20:01:43 UTC
Responsible Changed
From-To: freebsd-bugs->jkh

Sysinstall is Jordan's baby. 
Comment 2 jkh freebsd_committer freebsd_triage 1999-05-07 06:33:17 UTC
State Changed
From-To: open->closed

Hmmm.  That's pretty cosmetic, but I guess I'll take it. :)