From mux@qualys.com  Fri Nov 30 08:05:16 2001
Return-Path: <mux@qualys.com>
Received: from noos.fr (r178m112.cybercable.tm.fr [195.132.178.112])
	by hub.freebsd.org (Postfix) with ESMTP id D87FA37B420
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Nov 2001 08:05:14 -0800 (PST)
Received: (from mux@localhost)
	by noos.fr (8.11.6/8.11.4) id fAUG5Dp12532;
	Fri, 30 Nov 2001 17:05:13 +0100 (CET)
	(envelope-from mux)
Message-Id: <200111301605.fAUG5Dp12532@noos.fr>
Date: Fri, 30 Nov 2001 17:05:13 +0100 (CET)
From: Maxime Henrion <mux@qualys.com>
Reply-To: Maxime Henrion <mux@qualys.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATH] Unbreaks df -l in some cases
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32401
>Category:       bin
>Synopsis:       [PATH] Unbreaks df -l in some cases
>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:   Fri Nov 30 08:10:01 PST 2001
>Closed-Date:    Fri Nov 30 08:53:31 PST 2001
>Last-Modified:  Fri Nov 30 08:53:58 PST 2001
>Originator:     Maxime Henrion
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
None.
>Environment:
System: FreeBSD nebula.noos.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #154: Thu Nov 29 16:12:02 CET 2001 root@nebula.noos.fr:/usr/src/sys/i386/compile/NEBULA i386

>Description:

	When there is no network filesystem code in the kernel (ie: when
lsvfs shows no filesystem with ``network'' in flags), df -l is broken
and shows no filesystem at all.  This is due to a little bug in the 
makenetvfslist() function.

>How-To-Repeat:

	Ensures that you have no network filesystem in the kernel or
loaded through a module (lsvfs should show no fs with the ``network''
flag), and run df -l.

>Fix:

	This fix has been tested by several people on the -current
mailing list (Subject: df -l broken).

--- df.diff begins here ---
Index: df.c
===================================================================
RCS file: /home/ncvs/src/bin/df/df.c,v
retrieving revision 1.32
diff -u -r1.32 df.c
--- df.c	1 Aug 2001 02:09:09 -0000	1.32
+++ df.c	30 Nov 2001 01:06:52 -0000
@@ -561,7 +561,9 @@
 		*strptr = ',';
 		free(listptr[i]);
 	}
-	*(--strptr) = NULL;
+	if (i > 0)
+		strptr--;
+	*strptr = NULL;
 
 	free(listptr);
 	return (str);
--- df.diff ends here ---


>Release-Note:
>Audit-Trail:

From: Ceri <setantae@submonkey.net>
To: Maxime Henrion <mux@qualys.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/32401: [PATH] Unbreaks df -l in some cases
Date: Fri, 30 Nov 2001 16:47:18 +0000

 There is a different patch (for -stable) in bin/32397
 
 Ceri
 
 -- 
 keep a mild groove on
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Fri Nov 30 08:53:31 PST 2001 
State-Changed-Why:  
Duplicate of 32397, which also contains a patch. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32401 
>Unformatted:
