hal/hald/linux common.c,1.7,1.8

David Zeuthen david at pdx.freedesktop.org
Sun Jun 20 06:27:56 PDT 2004


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

Modified Files:
	common.c 
Log Message:
2004-06-20  David Zeuthen  <david at fubar.dk>

	* hald/Makefile.am (install-data-local): Create
	$(LOCALSTATEDIR)/lib/hal

	* hald/linux/common.c (rename_and_merge): Check
	persistent_device_list configuration value

	* hald/device.c (hal_device_property_set_attribute) 
	(hal_device_property_set_string, hal_device_property_set_bool) 
	(hal_device_property_set_double, hal_device_property_remove): 
	Check persistent_device_list configuration value

	* hald/hald.c (main): Check persistent_device_list configuration
	value

	* hald/hald.conf: Add persistent_device_list tag, set to false
	as default

	* hald/hald_conf.h: Add persistent_device_list member

	* hald/hald_conf.c (hald_conf): Add persistent_device_list member
	(end): Check for persistent_device_list tag

	* hald/property.h: Rename property_attribute to PropertyAttribute

2004-06-20  David Zeuthen  <david at fubar.dk>

	Patch from Kay Sievers <kay.sievers at vrfy.org>

	* hald/pstore.[ch]: New files

	* hald/linux/common.c (rename_and_merge): Load a device from disk

	* hald/property.h: Add property_attribute enum and 
	hal_property_get_attribute(), hal_property_set_attribute()

	* hald/property.c: Add readonly, persistence, callout bools to
	HalProperty
	(hal_property_set_attribute): New function
	(hal_property_get_attribute): New function

	* hald/hald_dbus.c (device_set_property): Set property to persistent

	* hald/hald.h: Add hald_get_pstore_sys

	* hald/hald.c (hald_get_pstore_sys): New function
	(main): Load persistent store

	* hald/device.h: Add hal_device_property_set_attribute()

	* hald/device.c (hal_device_property_set_string):
	(hal_device_property_set_int, hal_device_property_set_bool)
	(hal_device_property_set_double): Save property to disk if the
	PERSISTENCE attribute is set
	(hal_device_property_remove): Delete property from disk if the
	PERSISTENCE attribyte is set
	(hal_device_property_set_attribute): New function

	* hald/Makefile.am (INCLUDES): Add PACKAGE_LOCALSTATEDIR
	(hald_SOURCES): add pstore.[ch]



Index: common.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/common.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- common.c	26 Apr 2004 20:42:13 -0000	1.7
+++ common.c	20 Jun 2004 13:27:45 -0000	1.8
@@ -44,8 +44,10 @@
 
 #include "../logger.h"
 #include "../device_store.h"
+#include "../pstore.h"
 #include "../device_info.h"
 #include "../hald.h"
+#include "../hald_conf.h"
 #include "common.h"
 
 /**
@@ -512,6 +514,9 @@
 			HAL_INFO (("Found a .fdi file for %s", d->udi));
 		}
 
+		/* add possible saved properties for this udi from disk*/
+		if (hald_get_conf ()->persistent_device_list)
+			hal_pstore_load_device (hald_get_pstore_sys (), d);
 	}
 
 	return computed_udi;





More information about the hal-commit mailing list