C / C++ / C#: Howto do “mount -a”

后端 未结 3 870
感动是毒
感动是毒 2021-01-20 09:40

Question:

In C/C++/C#. (I need it for C#, but C and C++ is also fine).

How can I do a mount -a on Linux. I mean programmatically, without st

3条回答
  •  感情败类
    2021-01-20 10:12

    Check out the man page by typing man 2 mount. It talks about a system call that can avoid the actual use of system():

    #include 
    int mount(const char *source, const char *target, const char *filesystemtype,
              unsigned long mountflags, const void *data);
    

提交回复
热议问题