hal/hald/dummy osspec.c,1.2,1.3
David Zeuthen
david at freedesktop.org
Thu Feb 24 17:55:10 PST 2005
Update of /cvs/hal/hal/hald/dummy
In directory gabe:/tmp/cvs-serv13820/hald/dummy
Modified Files:
osspec.c
Log Message:
2005-02-24 David Zeuthen <davidz at redhat.com>
* hald/linux2/osspec.c (osspec_shutdown): Remove this function
* hald/dummy/osspec.c (computer_callouts_add_done): New function
(osspec_probe): Fixup to use new di_search_and_merge stuff
* hald/util.h: Export prototype for hal_util_kill_all_helpers
* hald/util.c (helper_child_exited): Remove from running_helpers list
(hal_util_helper_invoke): Add to running_helpers list
(hal_util_kill_all_helpers): New function (uses running_helpers list)
* hald/osspec.h: Don't export osspec_shutdown and osspec_shutdown_done
* hald/haldaemon.in: No need to add @LIBEXECDIR@ to PATH now that
hald does that itself
* hald/hald.c (main): Add PACKAGE_LIBEXEC_DIR to out path. Fix a fd
leak also (pointed out by Kay Sievers).
(sigterm_iochn_data): Kill all pending helpers and exit
* hald/device_info.c (di_search_and_merge): Fixup some stupid typos
* hald/Makefile.am (INCLUDES): Include PACKAGE_LIBEXEC_DIR
Index: osspec.c
===================================================================
RCS file: /cvs/hal/hal/hald/dummy/osspec.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- osspec.c 24 Feb 2005 17:33:03 -0000 1.2
+++ osspec.c 25 Feb 2005 01:55:08 -0000 1.3
@@ -34,15 +34,24 @@
#include "../osspec.h"
#include "../logger.h"
#include "../hald.h"
+#include "../util.h"
+#include "../device_info.h"
void
osspec_init (void)
{
}
-void
-osspec_shutdown (void)
+static void
+computer_callouts_add_done (HalDevice *d, gpointer userdata1, gpointer userdata2)
{
+ HAL_INFO (("Add callouts completed udi=%s", d->udi));
+
+ /* Move from temporary to global device store */
+ hal_device_store_remove (hald_get_tdl (), d);
+ hal_device_store_add (hald_get_gdl (), d);
+
+ osspec_probe_done ();
}
void
@@ -59,13 +68,10 @@
hal_device_store_add (hald_get_tdl (), root);
- di_search_and_merge (root);
-
- hal_device_store_remove (hald_get_tdl (), root);
- hal_device_store_add (hald_get_gdl (), root);
-
+ di_search_and_merge (root, DEVICE_INFO_TYPE_INFORMATION);
+ di_search_and_merge (root, DEVICE_INFO_TYPE_POLICY);
- osspec_probe_done ();
+ hal_util_callout_device_add (root, computer_callouts_add_done, NULL, NULL);
}
DBusHandlerResult
More information about the hal-commit
mailing list