Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxx.UUCP Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!ihuxx!ignatz From: ignatz@ihuxx.UUCP (Dave Ihnat, Chicago, IL) Newsgroups: net.unix Subject: Re: Question about ustat(2) and free disk space Message-ID: <709@ihuxx.UUCP> Date: Thu, 29-Mar-84 20:39:53 EST Article-I.D.: ihuxx.709 Posted: Thu Mar 29 20:39:53 1984 Date-Received: Fri, 30-Mar-84 03:37:19 EST References: <128@forcm5.UUCP> Organization: AT&T Bell Labs, Naperville, IL Lines: 43 Hello. I was reading "The Programmer's Workbench" (an article in the 1978 special UNIX issue of the Bell Systems Technical Journal), and I noticed the following sentence: "The ustat system call was added to allow programs to discover the amount of free space remaining in a file system." Since I haven't seen ustat in the V7, Sys III, or 4.1BSD documentation, I'd like to know: 1) What happened to ustat? 2) What are/were it's arguments? I assume it returned a long, for the number of bytes (where -1 might mean an error of some sort). 3) How can someone do the same thing without using the ustat system call? 4) How does df(1) work? Thanks in advance... Chief question asker -- JR (John Rogers) UUCP: forcm5!jr, fortune!jr, proper!jr CompuServe: 70140,213 Excuse me, John...but I just looked at Sys III, V, and V.2 documentation. All clearly list info on the ustat(2) call. Interface is: #include #include int ustat(dev,buf) int dev; struct ustat *buf; It returns total free blocks, number of free inodes, the filsys name, and the filsys pack name. (All of this is USG. Dammfino what it looks like for BSD.) And this is how df(1) does it. Dave Ihnat ihuxx!ignatz