From setantae@submonkey.net  Fri Nov 30 05:57:37 2001
Return-Path: <setantae@submonkey.net>
Received: from relay3-gui.server.ntli.net (relay3-gui.server.ntli.net [194.168.4.200])
	by hub.freebsd.org (Postfix) with ESMTP id 4AE3237B416
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Nov 2001 05:57:36 -0800 (PST)
Received: from pc3-card4-0-cust122.cdf.cable.ntl.com
	([62.254.251.122] helo=rhadamanth.private.submonkey.net ident=exim)
	by relay3-gui.server.ntli.net with esmtp (Exim 3.03 #2)
	id 169oAZ-0003Tu-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 30 Nov 2001 13:57:35 +0000
Received: from setantae by rhadamanth.private.submonkey.net with local (Exim 3.33 #1)
	id 169oA0-0000s8-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 30 Nov 2001 13:57:00 +0000
Message-Id: <E169oA0-0000s8-00@rhadamanth.private.submonkey.net>
Date: Fri, 30 Nov 2001 13:57:00 +0000
From: Ceri <setantae@submonkey.net>
Sender: Ceri <setantae@submonkey.net>
Reply-To: Ceri <setantae@submonkey.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: df -l doesn't work
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32397
>Category:       bin
>Synopsis:       df -l doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 30 06:00:02 PST 2001
>Closed-Date:    Wed Dec 19 00:48:24 PST 2001
>Last-Modified:  Wed Dec 19 11:40:00 PST 2001
>Originator:     Ceri <setantae@submonkey.net>
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD rhadamanth.private.submonkey.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Mon Nov 26 13:11:22 GMT 2001 setantae@rhadamanth.private.submonkey.net:/usr/obj/usr/src/sys/RHADAMANTH i386


	
>Description:
	df(1)'s -l option is supposed to report information only about
	local filesystems.  Instead, it reports nothing.

>How-To-Repeat:

	setantae@rhadamanth setantae$ mount
	/dev/ad4s2a on / (ufs, local)
	mfs:30 on /tmp (mfs, asynchronous, local, noatime, nosuid)
	/dev/ad4s2e on /home (ufs, local, soft-updates)
	/dev/ad4s2g on /usr (ufs, local, soft-updates)
	/dev/ad4s2h on /usr/src (ufs, local, soft-updates)
	/dev/ad4s2d on /usr/ports (ufs, local, soft-updates)
	/dev/ad6s2f on /usr/obj (ufs, local, soft-updates)
	/dev/ad4s2f on /var (ufs, local, soft-updates)
	/dev/ad6s5 on /data (msdos, local)
	/dev/ad6s2e on /data/audio/all (ufs, local, soft-updates)
	procfs on /proc (procfs, local)
	/dev/acd1a on /cdr (cd9660, local, read-only)
	setantae@rhadamanth setantae$ df -l
	setantae@rhadamanth setantae$ 

>Fix:

	No idea.

>Release-Note:
>Audit-Trail:

From: "Alexey V. Neyman" <alex.neyman@auriga.ru>
To: Ceri <setantae@submonkey.net>, FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/32397: df -l doesn't work
Date: Fri, 30 Nov 2001 17:56:14 +0300

 Hi, there!
 
 Try the following:
 --- /usr/src/bin/df/df.c        Tue Oct 30 16:29:03 2001
 +++ /usr/src/bin/df/df.c        Fri Nov 30 20:53:20 2001
 @@ -552,7 +552,8 @@
  	}
  
  	*str = 'n'; *(str+1) = 'o';
 -	for (i = 0,strptr=str+2; i < cnt; i++,strptr++) {
 +	strptr=str+2+!cnt;
 +	for (i = 0; i < cnt; i++,strptr++) {
  		strncpy (strptr, listptr[i], 32);
  		strptr+=strlen(listptr[i]);
  		*strptr=',';
 
 Regards,
 Alexey.
 
 -- 
 <------------------------->
  ) May the Sun and Water (   Regards, Alexey V. Neyman
  ) always fall upon you! (   mailto:alex.neyman@auriga.ru
 <------------------------->

From: "Alexey V. Neyman" <alex.neyman@auriga.ru>(by way of Alexey V. Neyman <alex.neyman@auriga.ru>)
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/32397: df -l doesn't work
Date: Fri, 30 Nov 2001 17:56:48 +0300

 Hi, there!
 
 Try the following:
 --- /usr/src/bin/df/df.c        Tue Oct 30 16:29:03 2001
 +++ /usr/src/bin/df/df.c        Fri Nov 30 20:53:20 2001
 @@ -552,7 +552,8 @@
  	}
  
  	*str = 'n'; *(str+1) = 'o';
 -	for (i = 0,strptr=str+2; i < cnt; i++,strptr++) {
 +	strptr=str+2+!cnt;
 +	for (i = 0; i < cnt; i++,strptr++) {
  		strncpy (strptr, listptr[i], 32);
  		strptr+=strlen(listptr[i]);
  		*strptr=',';
 
 Regards,
 Alexey.
 
 -- 
 <------------------------->
  ) May the Sun and Water (   Regards, Alexey V. Neyman
  ) always fall upon you! (   mailto:alex.neyman@auriga.ru
 <------------------------->
 
 
 -- 
 <------------------------->
  ) May the Sun and Water (   Regards, Alexey V. Neyman
  ) always fall upon you! (   mailto:alex.neyman@auriga.ru
 <------------------------->

From: Ceri <setantae@submonkey.net>
To: "Alexey V. Neyman" <alex.neyman@auriga.ru>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/32397: df -l doesn't work
Date: Fri, 30 Nov 2001 15:09:11 +0000

 That patch fixes the issue, thanks!
 
 Ceri
 
 -- 
 keep a mild groove on
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Fri Nov 30 08:50:49 PST 2001 
State-Changed-Why:  


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32397 
State-Changed-From-To: closed->open 
State-Changed-By: dwmalone 
State-Changed-When: Fri Nov 30 08:51:44 PST 2001 
State-Changed-Why:  
Closed by mistake. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32397 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Wed Dec 19 00:48:24 PST 2001 
State-Changed-Why:  
Fixed in df.c, rev. 1.34 (5.0-CURRENT) and rev. 1.23.2.5 (4.4-STABLE). 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Wed Dec 19 00:48:24 PST 2001 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32397 

From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mikko@rsasecurity.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/32397: df -l doesn't work
Date: Wed, 19 Dec 2001 11:34:20 -0800 (PST)

 Just a data point for anyone trying to reproduce the problem:
 
 The bug is triggered by not having any network file systems loaded.
 They don't have to be mounted, just loaded.  E.g. if "nfs" shows up
 with "lsvfs", "df -l " will work, if not, it won't.
 
 Thus:
 
   gw% lsvfs
   Filesystem                        Refs Flags
   -------------------------------- ----- ---------------
   ufs                                  5
   procfs                               1 synthetic
   gw% df -l
   gw%
   gw% su -m
   Password:
   gw# kldload nfs
   gw# ^D
   gw% lsvfs
   Filesystem                        Refs Flags
   -------------------------------- ----- ---------------
   ufs                                  5
   procfs                               1 synthetic
   nfs                                  0 network
   gw% df -l
   Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
   /dev/ad0s1a    254063    45332   188406    19%    /
   /dev/ad0s1g  34487716  1482012 30246688     5%    /home
   /dev/ad0s1e   2032623   519974  1350040    28%    /usr
   /dev/ad0s1f   2032623     2901  1867113     0%    /var
   procfs              4        4        0   100%    /proc
   /dev/vn0c      130020        4   119616     0%    /tmp
 
 And, yes, the patch works.
 
          /Mikko
 
  Mikko Ty=F6l=E4j=E4rvi_______________________________________mikko@rsase=
 curity.com
  RSA Security
 
>Unformatted:
