Paul van der Zwan wrote:
> 
> I noticed the -l option of the df command is broken. It is supposed to 
> print df for local filesystems but on my system it prints nothing at all.
> I had a quick look at the code , as far as I can tell it uses sysctl to
> figure out the mounted filesystems but thinks all of them are non-local and
> ignores them.
> Using sysctl -a I could not find any entries which looked vaguely like
> describing a mount..
> 
>       Paul

Could you please test the attached patch ?  I did it in a hurry but it
may fix the problem.

Thanks,
Maxime Henrion
-- 
Don't be fooled by cheap finnish imitations ; BSD is the One True Code
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        25 Nov 2001 22:57:49 -0000
@@ -561,7 +561,8 @@
                *strptr = ',';
                free(listptr[i]);
        }
-       *(--strptr) = NULL;
+       if (i > 0)
+               *(--strptr) = NULL;
 
        free(listptr);
        return (str);

Reply via email to