hal/tools fstab-sync.c,1.14,1.15

Kay Sievers kay at freedesktop.org
Wed Aug 25 16:56:12 PDT 2004


Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv1266/tools

Modified Files:
	fstab-sync.c 
Log Message:
2004-08-26  Kay Sievers  <kay.sievers at vrfy.org>

        * doc/spec/hal-spec.xml.in: Add description of "volume.fsusage"

        * hald/linux/block_class_device.c:
        (set_volume_id_values): Use "volume.fsusage" instead of "is_filesystem"
        and "is_part_of_raid"
        (detect_media), (block_class_pre_process): Set missing defaults and
        remove "is_filesystem"

        * hald/linux/volume_id/volume_id.c: (probe_linux_raid),
        (probe_msdos_part_table), (probe_ext), (probe_reiserfs),
        (probe_xfs), (probe_jfs), (probe_vfat), (probe_udf),
        (probe_iso9660), (probe_ufs), (probe_mac_partition_map),
        (probe_hfs_hfsplus), (probe_ntfs), (probe_swap): Switch naming
        form "format" and "type" to "type" and "usage" to match the
        names we use in HAL now. 

        * tools/fstab-sync.c: (udi_is_volume_or_nonpartition_drive):
        Switch from "is_filesystem" to "volume.fsusage" to determine
        if the volume is mountable



Index: fstab-sync.c
===================================================================
RCS file: /cvs/hal/hal/tools/fstab-sync.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- fstab-sync.c	25 Aug 2004 20:55:13 -0000	1.14
+++ fstab-sync.c	25 Aug 2004 23:56:09 -0000	1.15
@@ -822,6 +822,7 @@
 static boolean
 udi_is_volume_or_nonpartition_drive (const char *udi)
 {
+  const char *fsusage;
 
   if (hal_device_query_capability (hal_context, udi, "volume")) {
 
@@ -831,8 +832,8 @@
 	!hal_device_get_property_bool (hal_context, udi, "volume.disc.has_data"))
       return FALSE;
 
-    if (hal_device_property_exists (hal_context, udi, "volume.is_filesystem") &&
-	!hal_device_get_property_bool (hal_context, udi, "volume.is_filesystem"))
+    fsusage = hal_device_get_property_string (hal_context, udi, "volume.fsusage");
+    if (fsusage == NULL || strcmp (fsusage, "filesystem") != 0)
       return FALSE;
 
     return TRUE;




More information about the hal-commit mailing list