Use kernel programs like mount from c++
Is there a better way to execute commands from c++ than system("CMD")?
For example, rather than calling Code:
system("mount -t cifs -ouid="+user+" "+share+" "+mountpoint); Code:
#import <libmount> |
this looks like your answer: http://linux.about.com/od/commands/l/blcmdl2_mount.htm. if you have the source code for mount on your machine, you could always take a look at that.
|
Mount(2)
from the manpage of MOUNT(2) (in case you're not familiar with that, you can look at it by typing "man 2 mount"):
SYNOPSIS #include <sys/mount.h> int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data); i think this is what you're looking for. |
All times are GMT -5. The time now is 05:25 PM. |