hal/hald hald.conf, 1.3, 1.4 hald_conf.c, 1.4, 1.5 hald_conf.h, 1.3, 1.4 property.c, 1.5, 1.6

David Zeuthen david at freedesktop.org
Wed Aug 11 11:53:53 PDT 2004


Update of /cvs/hal/hal/hald
In directory pdx:/tmp/cvs-serv15046/hald

Modified Files:
	hald.conf hald_conf.c hald_conf.h property.c 
Log Message:
2004-08-11  David Zeuthen  <david at fubar.dk>

	* doc/spec/hal-spec.xml.in: Add docs for block.have_scanned,
	volume.is_filesystem, Device Conditions on volume device
	objects (now with new names), 'unknown' value for
	volume.disc.type, 'platform' value for storage.bus, rename
	storage.automount_enabled to storage.automount_enabled_hint. Add
	property storage.no_partitions_hint

	* hald/hald.conf:
	* hald/hald_conf.[ch]:
	Rename storage.automount_enabled to storage.automount_enabled_hint
	and remove storage.cdrom_eject_check_enabled.

	* hald/linux/common.[ch]:

	* hald/linux/platform_bus_device.c: (platform_device_pre_process):

	* hald/property.c (hal_property_get_bool): Return FALSE instead of
	-1 if property not found.

	* hald/linux/block_class_device.c: (set_volume_id_values),
	(get_child_device_gdl), (get_child_device_tdl),
	(block_class_visit), (cdrom_get_properties), (force_unmount),
	(force_unmount_of_all_childs), (get_first_valid_partition),
	(detect_disc), (detect_media), (block_class_pre_process),
	(mtab_handle_storage), (mtab_handle_volume):
	Unified codepaths for handling optical discs and other removable
	storage. Handle media with no partition table much nicer
	
	* hald/linux/volume_id/volume_id.c: (set_label_string),
	(set_label_unicode16), (set_uuid), (get_buffer),
	(probe_msdos_part_table), (probe_ext), (probe_reiser), (probe_xfs),
	(probe_jfs), (probe_vfat), (probe_msdos), (probe_udf),
	(probe_iso9660), (probe_ufs), (probe_mac_partition_map),
	(probe_hfs_hfsplus), (probe_ntfs), (probe_swap), (volume_id_probe),
	(volume_id_close):
	* hald/linux/volume_id/volume_id.h:
	Add support for parsing partition tables from Kay Sievers 
	<kay.sievers at vrfy.org>. Change 'reiser' to 'reiserfs' because
	the that's the name on Linux.



Index: hald.conf
===================================================================
RCS file: /cvs/hal/hal/hald/hald.conf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hald.conf	20 Jun 2004 13:27:45 -0000	1.3
+++ hald.conf	11 Aug 2004 18:53:50 -0000	1.4
@@ -26,7 +26,7 @@
   <storage_media_check_enabled>true</storage_media_check_enabled>
 
 
-  <!-- Default value for storage.automount_enabled for devices of
+  <!-- Default value for storage.automount_enabled_hint for devices of
        capability storage - this can be overridden by .fdi files.
 	 
        Setting this to false results a whitelist policy, e.g. policy
@@ -37,21 +37,6 @@
        where policy agents should always automount unless this is
        explicitly overridden by .fdi for devices causing trouble.
   -->
-  <storage_automount_enabled>true</storage_automount_enabled>
-
-
-  <!-- Default value for storage.cdrom.eject_check_enabled for devices
-       of capability storage.cdrom - this can be overridden by .fdi
-       files.
-	 
-       Setting this to false results a whitelist policy, e.g. the
-       eject button is only checked if this property is overridden in
-       a .fdi file.
-	 
-       Conversely, setting it to true results in a blacklist policy
-       where the eject button is always checked unless this is
-       explicitly overridden by .fdi file for devices causing trouble.
-  -->
-  <storage_cdrom_eject_check_enabled>true</storage_cdrom_eject_check_enabled>
+  <storage_automount_enabled_hint>true</storage_automount_enabled_hint>
 
 </haldconfig>

Index: hald_conf.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_conf.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hald_conf.c	20 Jun 2004 13:27:45 -0000	1.4
+++ hald_conf.c	11 Aug 2004 18:53:50 -0000	1.5
@@ -42,8 +42,7 @@
 /* default values */
 static HaldConf hald_conf = {
 	TRUE,  /* storage.media_check_enabled */
-	TRUE,  /* storage.automount_enabled */
-	TRUE,  /* storage.cdrom.eject_check_enabled */
+	TRUE,  /* storage.automount_enabled_hint */
 	FALSE  /* persistent_device_list */
 };
 
@@ -110,12 +109,9 @@
 	if ((strcmp (key, "storage_media_check_enabled") == 0) &&
 	    (strcmp (value, "false") == 0)) {
 		hald_conf.storage_media_check_enabled = FALSE;
-	} else if ((strcmp (key, "storage_automount_enabled") == 0) &&
-		   (strcmp (value, "false") == 0)) {
-		hald_conf.storage_automount_enabled = FALSE;
-	} else if ((strcmp (key, "storage_cdrom_eject_check_enabled") == 0) &&
+	} else if ((strcmp (key, "storage_automount_enabled_hint") == 0) &&
 		   (strcmp (value, "false") == 0)) {
-		hald_conf.storage_cdrom_eject_check_enabled = FALSE;
+		hald_conf.storage_automount_enabled_hint = FALSE;
 	} else if ((strcmp (key, "persistent_device_list") == 0) &&
 		   (strcmp (value, "true") == 0)) {
 		hald_conf.persistent_device_list = TRUE;

Index: hald_conf.h
===================================================================
RCS file: /cvs/hal/hal/hald/hald_conf.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hald_conf.h	20 Jun 2004 13:27:45 -0000	1.3
+++ hald_conf.h	11 Aug 2004 18:53:50 -0000	1.4
@@ -65,24 +65,7 @@
 	 *
 	 *  Default value is TRUE, this may be overridden in hald.conf.
 	 */
-	dbus_bool_t storage_automount_enabled;
-
-	/** Default value for storage.cdrom.eject_check_enabled for
-	 *  devices of capability storage.cdrom - this can be overridden by
-	 *  .fdi files.
-	 *
-	 *  Setting this to FALSE results a whitelist policy,
-	 *  e.g. the eject button is only checked if this property is
-	 *  overridden in a .fdi file.
-	 *
-	 *  Conversely, setting it to TRUE results in a blacklist
-	 *  policy where the eject button is always checked unless
-	 *  this is explicitly overridden by .fdi file for devices
-	 *  causing trouble.
-	 *
-	 *  Default value is TRUE, this may be overridden in hald.conf.
-	 */
-	dbus_bool_t storage_cdrom_eject_check_enabled;
+	dbus_bool_t storage_automount_enabled_hint;
 
 	/** If true, then the device list is saved to disk such that
          *  properties are kept between invocations of hald.

Index: property.c
===================================================================
RCS file: /cvs/hal/hal/hald/property.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- property.c	30 Jul 2004 16:48:40 -0000	1.5
+++ property.c	11 Aug 2004 18:53:50 -0000	1.6
@@ -165,7 +165,7 @@
 dbus_bool_t
 hal_property_get_bool (HalProperty *prop)
 {
-	g_return_val_if_fail (prop != NULL, -1);
+	g_return_val_if_fail (prop != NULL, FALSE);
 	g_return_val_if_fail (prop->type == DBUS_TYPE_BOOLEAN, -1);
 
 	return prop->bool_value;




More information about the hal-commit mailing list