i need a c-function that can get me the size of the hd,
without using system(), via ftell and fseek i can determine the size of a file, but as soon as i try to use this on eg. dev/hda it all goes wrong,
in my programm the file is opened via low-level i/o,
it works perfectly as long as i open a single file, as soon as i try to open the /dev/hda it all goes wrong
That's because /dev/hda is a device, not a file. I guess you could take a look at df's source code, as it is open source. You could probably find what you need in there. //Daniel
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.