hal/hald hald_runner.c,1.8,1.9

Joe Marcus Clarke marcus at kemper.freedesktop.org
Sun May 14 11:49:55 PDT 2006


Update of /cvs/hal/hal/hald
In directory kemper:/tmp/cvs-serv17906/hald

Modified Files:
	hald_runner.c 
Log Message:
Split out the tools scripts into an OS-independent wrapper, and an OS-dependent
backend.  The backend selection with be based on the utsname.sysname value.
Also, add FreeBSD support to hal-storage-mount.c (code from
Jean-Yves Lefort <jylefort at FreeBSD.org>).

Reviewed by:	Artem Kachitchkine, David Zeuthen
Approved by:	David Zeuthen


Index: hald_runner.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_runner.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- hald_runner.c	9 May 2006 20:34:37 -0000	1.8
+++ hald_runner.c	14 May 2006 18:49:53 -0000	1.9
@@ -27,6 +27,7 @@
 #  include <config.h>
 #endif
 
+#include <sys/utsname.h>
 #include <stdio.h>
 
 #include <glib.h>
@@ -166,6 +167,8 @@
 
 static void
 add_basic_env(DBusMessageIter *iter, const gchar *udi) {
+  struct utsname un;
+
   if (hald_is_verbose) {
     add_env(iter, "HALD_VERBOSE", "1");
   }
@@ -175,9 +178,16 @@
   if (hald_use_syslog) {
     add_env(iter, "HALD_USE_SYSLOG", "1");
   }
-
   add_env(iter, "UDI", udi);
   add_env(iter, "HALD_DIRECT_ADDR", hald_dbus_local_server_addr());
+
+  if (uname(&un) == 0) {
+    char *sysname;
+
+    sysname = g_ascii_strdown(un.sysname, -1);
+    add_env(iter, "HALD_UNAME_S", sysname);
+    g_free(sysname);
+  }
 }
 
 static void




More information about the hal-commit mailing list