From gpr@nvnpp.vrn.ru  Tue Mar 19 03:06:45 2002
Return-Path: <gpr@nvnpp.vrn.ru>
Received: from ic.vrn.ru (ic.vrn.ru [195.98.64.65])
	by hub.freebsd.org (Postfix) with ESMTP id CA3ED37B417
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Mar 2002 03:06:43 -0800 (PST)
Received: from relay.nvnpp.vrn.ru ([195.98.93.102])
	by ic.vrn.ru (8.11.6/8.11.1) with ESMTP id g2JB6bH33276
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Mar 2002 14:06:38 +0300 (MSK)
	(envelope-from gpr@nvnpp.vrn.ru)
Received: from nvnpp.vrn.ru by relay.nvnpp.vrn.ru
	with SMTP (MDaemon.v3.1.0.R)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Mar 2002 14:06:15 +0300
Received: from fbsd.nvnpp.vrn.ru by nvnpp.vrn.ru
	with SMTP (MDaemon.PRO.v5.0.4.R)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Mar 2002 14:06:07 +0300
Received: from gpr by fbsd.nvnpp.vrn.ru with local (Exim 3.33 #1)
	id 16nHRP-0004iN-00
	for FreeBSD-gnats-submit@freebsd.org; Tue, 19 Mar 2002 14:06:07 +0300
Message-Id: <E16nHRP-0004iN-00@fbsd.nvnpp.vrn.ru>
Date: Tue, 19 Mar 2002 14:06:07 +0300
From: Gennady Proskurin <gpr@nvnpp.vrn.ru>
Reply-To: Gennady Proskurin <gpr@fbsd.nvnpp.vrn.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] mount_nfs loads "nfs" module instead of "nfsclient"
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         36088
>Category:       bin
>Synopsis:       [patch] mount_nfs loads "nfs" module instead of "nfsclient"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 19 03:10:01 PST 2002
>Closed-Date:    Wed Mar 20 00:55:04 PST 2002
>Last-Modified:  Wed Mar 20 00:55:04 PST 2002
>Originator:     Gennady Proskurin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD gpr.nvnpp.lan 5.0-CURRENT FreeBSD 5.0-CURRENT #31: Mon Mar 19 09:59:59 MSK 2002 gpr@gpr.nvnpp.lan:/usr/obj/usr/src/sys/gpr i386

	
>Description:
mount_nfs(8) tries to load "nfs" module instead "nfs_client", if no
NFS filesystem module in kernel
	
>How-To-Repeat:
- Make sure, that kernel doesn't support nfs VFS (compiled without NFS and no nfsclient module loaded)
- Try to mount any filesystem using mount_nfs

Result:
nfs: vfsload(nfs): No such file or directory

	
>Fix:

--- src/sbin/mount_nfs/mount_nfs.c.orig	Tue Mar 19 13:19:05 2002
+++ src/sbin/mount_nfs/mount_nfs.c	Tue Mar 19 13:32:55 2002
@@ -437,9 +437,9 @@
 	(void)checkpath(name, mntpath);
 
 	error = getvfsbyname("nfs", &vfc);
-	if (error && vfsisloadable("nfs")) {
-		if(vfsload("nfs"))
-			err(EX_OSERR, "vfsload(nfs)");
+	if (error && vfsisloadable("nfsclient")) {
+		if(vfsload("nfsclient"))
+			err(EX_OSERR, "vfsload(nfsclient)");
 		endvfsent();	/* clear cache */
 		error = getvfsbyname("nfs", &vfc);
 	}

	


>Release-Note:
>Audit-Trail:

From: Ian Dowse <iedowse@maths.tcd.ie>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/36088: [patch] mount_nfs loads "nfs" module instead of "nfsclient" 
Date: Tue, 19 Mar 2002 14:05:16 +0000

 In message <E16nHRP-0004iN-00@fbsd.nvnpp.vrn.ru>, Gennady Proskurin writes:
 >mount_nfs(8) tries to load "nfs" module instead "nfs_client", if no
 >NFS filesystem module in kernel
 
 This should work fine, because the "nfsclient.ko" file contains a
 module called "nfs":
 
 	> kldxref -d /boot/kernel/nfsclient.ko 
 	/boot/kernel/nfsclient.ko
 	  module nfs
 	  interface nfs.1
 
 Maybe your /boot/kernel/linker.hints file got lost? When you try
 to load "nfs", the kernel is supposed to look it up in linker.hints
 and determine that the module exists in nfsclient.ko. It certainly
 works for me, although this is on a -CURRENT that is a few weeks
 old:
 
 	temp1# kldstat
 	Id Refs Address    Size     Name
 	 1    1 0xc0100000 29cb64   kernel
 	temp1# mount_nfs synge:/usr/local /mnt
 	temp1# kldstat
 	Id Refs Address    Size     Name
 	 1    2 0xc0100000 29cb64   kernel
 	 2    1 0xc133d000 16000    nfsclient.ko
 	temp1# df /mnt
 	Filesystem        1K-blocks     Used    Avail Capacity  Mounted on
 	synge:/usr/local    2540782  1809164   528356    77%    /mnt
 
 The linker.hints file should be automatically generated when you
 install the modules.
 
 Can this be closed?
 
 Ian
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Wed Mar 20 00:53:44 PST 2002 
State-Changed-Why:  

Submitter says that this can be closed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=36088 
>Unformatted:
