From chris@holly.dyndns.org Sun Mar 21 11:54:27 1999
Return-Path: <chris@holly.dyndns.org>
Received: from holly.dyndns.org (ip202.houston5.tx.pub-ip.psi.net [38.11.7.202])
	by hub.freebsd.org (Postfix) with ESMTP id C05F214C3B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Mar 1999 11:54:19 -0800 (PST)
	(envelope-from chris@holly.dyndns.org)
Received: (from chris@localhost)
	by holly.dyndns.org (8.9.3/8.9.2) id NAA04416;
	Sun, 21 Mar 1999 13:55:49 -0600 (CST)
	(envelope-from chris)
Message-Id: <199903211955.NAA04416@holly.dyndns.org>
Date: Sun, 21 Mar 1999 13:55:49 -0600 (CST)
From: Chris Costello <chris@holly.dyndns.org>
Reply-To: chris@calldei.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: [Patch] sysinstall does not use the proper fs name for 'file system' option
X-Send-Pr-Version: 3.2

>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:    jkh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 21 12:00:01 PST 1999
>Closed-Date:    Thu May 6 22:33:17 PDT 1999
>Last-Modified:  Thu May  6 22:38:38 PDT 1999
>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:
Responsible-Changed-From-To: freebsd-bugs->jkh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Tue Mar 23 12:01:43 PST 1999 
Responsible-Changed-Why:  
Sysinstall is Jordan's baby. 
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Thu May 6 22:33:17 PDT 1999 
State-Changed-Why:  
Hmmm.  That's pretty cosmetic, but I guess I'll take it. :) 
>Unformatted:
