cvs commit: src/bin/df df.1 df.c
Christian S.J. Peron
csjp at FreeBSD.org
Tue Jul 20 11:24:47 PDT 2004
csjp 2004-07-20 18:24:47 UTC
FreeBSD src repository
Modified files:
bin/df df.1 df.c
Log:
Currently if a mount point is not accessible by the calling user,
invalid information will be printed if the -t flag is specified.
$ df -t ufs
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 495726 139944 316124 31% /
/dev/ad0s1e 253678 6438 226946 3% /tmp
/dev/ad0s1f 56206340 13594248 38115586 26% /usr
/dev/ad0s1d 694126 19812 618784 3% /var
/dev/ad0s1d 694126 19812 618784 3% /var
$
Note that the mount point which is not accessible shows
up as the previous file system that was printed. The reason
for this is that df -t will call statfs(2) on the pathname
supplied by getfsstat(2).
This is done to refresh the file system statistics in the
event that a previous file system had a long delay in
providing its stats.
This change affects the df utility in the following ways:
o Teach df has to deal with statfs(2) failing. If statfs(2)
fails, fall back on the possibly stale stats provided by
the initial call to getfsstat(2).
o Print a warning that the fs stats could possibly be stale
o Modify the man page and document this new behavior
as a bug.
Approved by: bmilekic (mentor)
PR: 68165
Revision Changes Path
1.36 +3 -1 src/bin/df/df.1
1.63 +15 -5 src/bin/df/df.c
More information about the cvs-all
mailing list