From owner-freebsd-bugs Fri Nov 30 8:10:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1EF0637B419 for ; Fri, 30 Nov 2001 08:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fAUGA1l04687; Fri, 30 Nov 2001 08:10:01 -0800 (PST) (envelope-from gnats) Received: from noos.fr (r178m112.cybercable.tm.fr [195.132.178.112]) by hub.freebsd.org (Postfix) with ESMTP id D87FA37B420 for ; 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 Reply-To: Maxime Henrion To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/32401: [PATH] Unbreaks df -l in some cases Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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