Link to home
Start Free TrialLog in
Avatar of bwleeul
bwleeul

asked on

How can i get the filesystem information for linux ?

I would like to know the function for getting filesystem information of linux( the information of superblock and cylinder group, the size of
 free inodes and blocks, etc) through some function of c language.

Which function can I use ? and how can i use the funtions ?

waiting for kindly answer.

Thanks and Best Regards,

BWLee
Avatar of bwleeul
bwleeul

ASKER

Adjusted points from 50 to 100
ASKER CERTIFIED SOLUTION
Avatar of anandk101299
anandk101299

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bwleeul

ASKER

thanks, anandk.

I had test the function, statfs.

struct statfs buf;
int ret;

ret = statfs("/dev/hda1", &buf);

The value of ret was always -1.

what's the problem ?

bwleeul