Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

How to check if filesystem is already mounted using C/C++

$
0
0

Hi I am writing an application which mounts cgroup as shown below

mount("cgroup", "/sys/fs/cgroup", "tmpfs",0,NULL);

I am able to do this but I want to add a check to know if this is already mounted, how do I do that using C/C++? Is there any API or system API to get mount information.I do not want to use system() call.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>