This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: statfs() and df returning errant values


At 04:05 PM 1/15/2001, M4um@aol.com wrote:
>Has anyone out there seen this problem and/or can suggest a way to code 
>around it?  This is all C code, not C++.
>
>The call statfs("/usr/crc", &statbuf ) returns 0; the path exists and is of 
>no interest because statbuf always contains the following, regardless of the 
>path involved (all printed as %ld):
>
>f_ type = 16390
>f_bsize = 32768 
>f_blocks = 65526  
>f_bfree = 65526 
>f_bavail = 65526
>f_files = -1 
>f_ffree = -1 
>f_fsid = 300162640 
>f_namelen = 255
>
>(Just as an aside, the statfs() call (requiring vfs.h) is different from the 
>SCO Unix version (using statfs.h) which also requires a buffer_lengh and a 
>fs_type parameter.  I suspect these two additions are to allow for 
>grandfathered differences in the size of struct statfs.)
>
>In a related issue, the bash command "df" always returns "used = 0" and 
>"used% = 0", regardless of which filesystem it is examining.  I'm not sure if 
>any of the other values are correct, either.
>
>I'm running the latest Cygwin, gcc, etc. on Win98 (FAT32).  See df and 
>cygcheck output below.
>
>Thanks,
>John McDonald
>m4um@aol.com 
>
>df: 
>Filesystem           1k-blocks      Used Available Use% Mounted on
>D:\Cygwin\contrib      2096832         0   2096832   0% /usr/contrib
>D:\Cygwin\usr\crc      2096832         0   2096832   0% /usr/crc
>D:\Cygwin\bin          2096832         0   2096832   0% /usr/bin
>D:\Cygwin\lib          2096832         0   2096832   0% /usr/lib
>D:\Cygwin              2096832         0   2096832   0% /
>H:                     2097120         0   2097120   0% /UNIX

Can you send the output of "cygcheck df" and df --version?  Also, what flags 
are you using to invoke df?  I get close to your output format if I use df -k
but my headers say:

Filesystem         1024-blocks  Used Available Capacity Mounted on


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]