Re: amount of blocks on a device

Alex Buell (alex.buell@tahallah.demon.co.uk)
Thu, 21 May 1998 16:59:18 -0400


Sieger Ralf AI wrote:
>
> How can I determine the amount of blocks on a given block device?

Speak of the devil. I was doing this yesterday. Have a look at vfs.h and
statvfs.h. Try the statvfs() and statfs() system calls; i.e

statfs("/home/.cshrc", &stats)

Check out the structures defined (struct statfs)

-- 
Cheers,
Alex.

Watch out, the NSA are everywhere. Your computer must be watched!

/\_/\ Legalise cannabis now! ( o.o ) Smoke some cannabis today! > ^ < Peace, Love, Unity and Respect to all.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu