hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Sun Aug 6 09:31:33 PDT 2006
hald/linux2/addons/addon-acpi.c | 4 ++++
hald/linux2/addons/addon-hid-ups.c | 4 ++++
hald/linux2/addons/addon-usb-csr.c | 6 ++++++
3 files changed, 14 insertions(+)
New commits:
diff-tree bf481939465e7a9408feba28380e78bf8b65b2f0 (from 732e625134171daf032c9dc39067efe68d6b41b8)
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Sun Aug 6 18:29:08 2006 +0200
set proc title for acpi/hid-ups/usb-csr addons
This patch sets the proc title for this addons:
* hald-addon-acpi: add the current source of ACPI events
* hald-addon-hid-ups: add "listening on $device_file"
* hald-addon-usb-csr: add "listening on '$info.product'"
diff --git a/hald/linux2/addons/addon-acpi.c b/hald/linux2/addons/addon-acpi.c
index 94ca913..9025e53 100644
--- a/hald/linux2/addons/addon-acpi.c
+++ b/hald/linux2/addons/addon-acpi.c
@@ -161,6 +161,8 @@ main (int argc, char **argv)
DBusError error;
FILE *eventfp;
+ hal_set_proc_title_init (argc, argv);
+
/* If we don't even consider the /proc ACPI interface, drop privileges
* right away */
#ifndef ACPI_PROC
@@ -182,6 +184,7 @@ main (int argc, char **argv)
drop_privileges (0);
if (eventfp) {
+ hal_set_proc_title ("hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event");
main_loop (ctx, eventfp);
dbg ("Lost connection to kernel acpi event source - exiting");
return 1;
@@ -193,6 +196,7 @@ main (int argc, char **argv)
#ifdef ACPI_ACPID
/* Else, try to use acpid. */
if ((eventfp = acpi_get_event_fp_acpid ())) {
+ hal_set_proc_title ("hald-addon-acpi: listening on acpid socket /var/run/acpid.socket");
main_loop (ctx, eventfp);
dbg ("Cannot connect to acpid event socket - retry connect");
}
diff --git a/hald/linux2/addons/addon-hid-ups.c b/hald/linux2/addons/addon-hid-ups.c
index be9df17..ffc4c65 100644
--- a/hald/linux2/addons/addon-hid-ups.c
+++ b/hald/linux2/addons/addon-hid-ups.c
@@ -272,6 +272,8 @@ main (int argc, char *argv[])
struct hiddev_event ev[64];
int rd;
+ hal_set_proc_title_init (argc, argv);
+
_set_debug ();
udi = getenv ("UDI");
@@ -293,6 +295,8 @@ main (int argc, char *argv[])
if (!ups_get_static (ctx, udi, fd))
goto out;
+ hal_set_proc_title ("hald-addon-hid-ups: listening on %s", device_file);
+
FD_ZERO(&fdset);
while (1) {
FD_SET(fd, &fdset);
diff --git a/hald/linux2/addons/addon-usb-csr.c b/hald/linux2/addons/addon-usb-csr.c
index 045c482..4ddc782 100644
--- a/hald/linux2/addons/addon-usb-csr.c
+++ b/hald/linux2/addons/addon-usb-csr.c
@@ -262,6 +262,8 @@ main (int argc, char *argv[])
{
DBusError err;
+ hal_set_proc_title_init (argc, argv);
+
_set_debug ();
device_udi = getenv ("UDI");
@@ -312,6 +314,10 @@ main (int argc, char *argv[])
dbus_error_init (&err);
libhal_device_add_capability (halctx, device_udi, "battery", &err);
+ hal_set_proc_title ("hald-addon-usb-csr: listening on '%s'",
+ libhal_device_get_property_string(halctx, device_udi,
+ "info.product", &err));
+
main_loop = g_main_loop_new (NULL, FALSE);
g_timeout_add (1000L * TIMEOUT, check_all_batteries, NULL);
g_main_loop_run (main_loop);
More information about the hal-commit
mailing list