![]() |
| | #1 |
| Registered User Join Date: Dec 2001
Posts: 7
| Can anyone help me with this? This is the code: ret = mount(DEVICE_FILE, MOUNT_DIR, "vfat", MS_MGC_VAL, NULL); I have all of the values figured out except MS_MGC_VAL. It is an unsigned long int passed to the mount function and is used for a read/write flag. This is the error: hda: hda1 hda: hda1 [Error] Can not Open conftest [Error] Testing all Segmentation fault [root@Linux /root]$mount /dev/ram0 on / type ext2 (rw) /proc on /proc type proc (rw) none on /dev/pts type devpts (rw) /dev/hda1 on /flash type vfat (rw) [root@Linux /root]$ As you can see the drive does get mounted in the code. I can read and write to it after the program has exited. The drive was not mounted before executing the program. I can't figure out what this value should be set at or if this is the problem. Thanks for any help, Matt |
| mattbrrtt is offline | |
| | #2 |
| Registered User Join Date: Nov 2002
Posts: 491
| Did you try reading errno? It is there for a reason. |
| orbitz is offline | |
| | #3 |
| +++ OK NO CARRIER Join Date: Oct 2001
Posts: 10,615
| Just take a look at the man page for said function... If the magic number is absent, then the last two arguments are not used Quzah.
__________________ Hundreds of thousands of dipshits can't be wrong. Are you up for the suck? |
| quzah is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Seg Fault in Compare Function | tytelizgal | C Programming | 1 | 10-25-2008 03:06 PM |
| Another syntax error | caldeira | C Programming | 31 | 09-05-2008 01:01 AM |
| In over my head | Shelnutt2 | C Programming | 1 | 07-08-2008 06:54 PM |
| Including lib in a lib | bibiteinfo | C++ Programming | 0 | 02-07-2006 02:28 PM |
| Dikumud | maxorator | C++ Programming | 1 | 10-01-2005 06:39 AM |