| Summary: | df -l doesn't work | ||
|---|---|---|---|
| Product: | Base System | Reporter: | setantae <setantae> |
| Component: | bin | Assignee: | ru <ru> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.4-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
setantae
2001-11-30 14:00:02 UTC
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
<------------------------->
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
<------------------------->
That patch fixes the issue, thanks! Ceri -- keep a mild groove on State Changed From-To: open->closed State Changed From-To: closed->open Closed by mistake. State Changed From-To: open->closed 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 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
|