I need to parse table of mounted filesystems without using /proc/mounts since I'm parsing it to determine where proc file system is mounted. How can I do it?
I've googled it, but all answers was to use /proc
And why people are so sure that procfs is mounted to default place?
I'm asking out of curiosity. I understand that /proc is a standard de-facto, many tools use it and so /proc is anchored pretty good.
Linux API is consistent towards filesystem paths, all really needed information is passed via environmental variables, making possible to alter library and executable files, configuration files and so on.
I'm curios is it possible to detec PROC_PATH
with no prior knowledge about it? I may do ftw with statvfs used as callback, but this is so ungraceful. There definetly should be more straight way.