Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2004 18:24:47 +0000 (UTC)
From:      "Christian S.J. Peron" <csjp@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/bin/df df.1 df.c
Message-ID:  <200407201824.i6KIOlkT006278@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407201824.i6KIOlkT006278>