A question about the system call mount in a C program
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> the following error message: Code:
Error: The program doesn't seem to be able to control the USB device in /etc/fstab: Code:
/dev/sdg1 /media/flashCorsaire auto defaults 0 0 And also here is what I see in /etc/mtab when I connect the USB to my PC Code:
/dev/sdg1 /media/flashCorsaire fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0 So what's the problem? Where did I make a mistake in the code that generates this error message? Thanks in advance, Kind Regards, Dariyoosh |
Did you try it yet without the trailing slash in "/media/flashCorsaire/" in the parameters to the 'mount' function ?
That's at least a little difference I can notice there, compared to your mtab entry. |
Quote:
|
All times are GMT -5. The time now is 10:26 PM. |