jcsf - 2007-10-09

// this is the signature fo fs_probe ( )
static int fs_probe (
         char *devpath
        ,int removable
        ,int writable
) ;

// which is called: in ext2util.c line 245
ret = fs_probe (
     rawdevpath
    ,strcmp ( argv [ 2 ], DEVICE_FIXED )
    ,strcmp ( argv [ 3 ], DEVICE_READONLY ) // __FIXE_ME__ should read argv [ 4 ]
) ;

// however, fs_mount ( )
static int fs_mount (
     char *devpath
    ,char * mount_point
    ,int removable
    ,int writable
    ,int suid
    ,int dev
) ;

// in main is being called in ext2util.c line 271 in the following fashion:
ret = fs_mount (
     blockdevpath                   
    ,argv [ 2 ]                    // label
    ,strcmp ( argv [ 3 ], DEVICE_FIXED )        // fixed
    ,strcmp ( argv [ 4 ], DEVICE_READONLY )        // read-only
    ,strcmp ( argv [ 5 ], DEVICE_NOSUID )        // no-suid
    ,strcmp ( argv [ 6 ], DEVICE_NODEV )        // no-dev
) ;

//
// which, clearly indicates that the 5th parameter, i.e, argv [ 4 ], is being
// used as the read only flag. My sugestion is ( see __FIXE_ME__ string ) above
// to use argv [ 4 ] instead of argv [ 3 ]
//

//
// I would try to see if I can compile the code with the modification above and see if works but
// I'm pretty sure I don't have XCode installed on my G5 dual 2.0 GHz machine
// I may try manually compile the code and manually try to mount the device to see if the change
// is correct; meanwhile I'd appreciate if this changed could be tried on the development branch.
//