Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2001 17:05:13 +0100 (CET)
From:      Maxime Henrion <mux@qualys.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/32401: [PATH] Unbreaks df -l in some cases
Message-ID:  <200111301605.fAUG5Dp12532@noos.fr>

next in thread | raw e-mail | index | archive | help

>Number:         32401
>Category:       bin
>Synopsis:       [PATH] Unbreaks df -l in some cases
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 08:10:01 PST 2001
>Closed-Date:
>Last-Modified:
>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:
>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?200111301605.fAUG5Dp12532>