Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.internals Subject: Re: What, exactly, are stat.st_blocks, statfs.f_b Message-ID: <1991Mar5.003617.20628@athena.mit.edu> Date: 5 Mar 91 00:36:17 GMT References: <124359@uunet.UU.NET> <1991Mar4.001026.3043@athena.mit.edu> <1991Mar04.015451.10436@kithrup.COM> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 27 I know about statfs; I did, after all, mention it in the subject line of my original message (which you may not have seen, since it was posted to comp.unix.wizards). The statfs I've got on my system (which came with the vnode code which came with our NFS code) doesn't appear to have a f_frsize element of the statfs structure. So I can't use it on my system. As you pointed out, statfs isn't a global thing. So I can't use it in general in my program. So, the question still remains -- is there any *reliable* way to find out what st_blocks counts in terms of? Is the answer, "If statfs exists on the system, AND it has an f_frsize field, then use that field and do statfs on every filesystem you encounter. Otherwise, use 512." Or is there something more I can do? Sigh. This all seems like such a muddled mess of different interfaces (or lacks of interface!) to the same information that I'm tempted to forget about the whole thing and not make any attempt at all to count blocks. Yuck. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710