Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010115160950.02316998@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Mon, 15 Jan 2001 16:12:56 -0500 To: M4um AT aol DOT com, cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: statfs() and df returning errant values In-Reply-To: <68.b2353e2.2794c003@aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 04:05 PM 1/15/2001, M4um AT aol DOT 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 AT aol DOT 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 AT rfk DOT 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