You probably want the statfs(2) syscall (it does not use /proc/
). You probably would use it thru statvfs(3) Posix function.
Notice that the /proc/
filesystem (and also /sys/
...) contains pseudo-files which are generated by the kernel on demand without any IO. See proc(5). You could read sequentially /proc/self/mounts
and/or /proc/self/mountstats
and/or appropriate files under /proc/fs/
and/or /sys/
(such as some files in /proc/fs/ext4/sda1/
or even in /sys/block/sda/sda1/
for my desktop computer ; it would be different on yours ....)
Perhaps systemd is also able to give such information, but I don't know it enough.