Index: exo-mount/exo-mount-hal.c =================================================================== --- exo-mount/exo-mount-hal.c (revision 28760) +++ exo-mount/exo-mount-hal.c (working copy) @@ -61,6 +61,7 @@ /* file system options */ gchar **fsoptions; const gchar *fstype; + const gchar *altfstype; LibHalVolumeUsage fsusage; }; @@ -243,6 +244,7 @@ /* setup the file system internals */ device->fstype = libhal_volume_get_fstype (device->volume); + device->altfstype = libhal_device_get_property_string (hal_context, udi, "volume.fstype.alternative.preferred", NULL); device->fsusage = libhal_volume_get_fsusage (device->volume); } } @@ -263,8 +265,16 @@ } /* determine the valid mount options from the UDI */ - device->fsoptions = libhal_device_get_property_strlist (hal_context, udi, "volume.mount.valid_options", &derror); - + if (device->altfstype) + { + char key[128]; + sprintf(key, "volume.mount.%s.valid_options", device->altfstype); + device->fsoptions = libhal_device_get_property_strlist (hal_context, udi, key, &derror); + } + else + { + device->fsoptions = libhal_device_get_property_strlist (hal_context, udi, "volume.mount.valid_options", &derror); + } /* sanity checking */ if (G_UNLIKELY (device->file == NULL || device->name == NULL)) { @@ -663,6 +673,7 @@ /* this is currently mostly Linux specific noise */ if (strcmp (device->fsoptions[m], "uid=") == 0 && (strcmp (device->fstype, "vfat") == 0 + || strcmp (device->altfstype, "ntfs-3g") == 0 || strcmp (device->fstype, "iso9660") == 0 || strcmp (device->fstype, "udf") == 0 || device->volume == NULL)) @@ -706,10 +717,16 @@ ? exo_str_replace (mount_point, G_DIR_SEPARATOR_S, "_") : g_strdup (""); - /* let HAL guess the fstype */ - fstype = g_strdup (""); - - /* setup the D-Bus error */ + if (G_UNLIKELY (device->altfstype != NULL)) + { + fstype = g_strdup (device->altfstype); + } + else + { + /* let HAL guess the fstype */ + fstype = g_strdup (""); + } + /* setup the D-Bus error */ dbus_error_init (&derror); /* now several times... */