I am looking for a linux api that returns me information about root filesystem.
I can use command stat -f / to get information about root filesystem. Is there any API that returns exactly same information as returned by "stat -f" command ?
I am looking for a linux api that returns me information about root filesystem.
I can use command stat -f / to get information about root filesystem. Is there any API that returns exactly same information as returned by "stat -f" command ?
Next time when you need to know API than does the same thing like a shell command you can use strace
. Like this: strace stat -f /
and see what calls do command. On my system it calls statfs64
.