Dear all,
Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will
be mounted and umounted for several times. I read the man page
of the mount system call.
I use the following test code
Code:
#include <sys/mount.h>
int main(int argc, char *argv[])
{
if (mount("/dev/sdg1", "/media/flashCorsaire/", "fuseblk",
MS_MGC_VAL,"rw,nosuid,nodev,allow_other,blksize=4096") != 0)
{
fprintf(stderr, "Error: The program doesn't seem to be able ");
fprintf(stderr, "to control the USB device\n");
fprintf(stderr, "%s\n", strerror(errno));
return 1;
}
return 0;
}