hal: Branch 'origin' - 10 commits
Joe Marcus Clarke
marcus at kemper.freedesktop.org
Tue Nov 28 22:12:43 PST 2006
examples/locking.py | 2
fdi/policy/10osvendor/20-storage-methods.fdi | 127 +++++++++++++++++----------
hald-runner/main.c | 4
hald/debug-hald.sh | 7 +
hald/device.c | 17 ++-
hald/hald.c | 3
hald/ids.c | 16 ++-
hald/ids.h | 4
hald/linux/osspec.c | 5 +
hald/logger.c | 4
hald/osspec.h | 3
hald/run-hald.sh | 7 +
hald/solaris/osspec.c | 5 +
hald/valgrind-hald.sh | 7 +
partutil/Makefile.am | 3
tools/device-manager/hal-device-manager.in | 2
tools/hal-storage-closetray.c | 5 -
tools/hal-storage-mount.c | 2
tools/hal-storage-shared.c | 9 +
19 files changed, 162 insertions(+), 70 deletions(-)
New commits:
diff-tree 630d5a55c08fcf645983859138081be974c1f21f (from 3c85157116607be297269b2012e1f999d7dc0a1b)
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date: Tue Nov 28 17:30:22 2006 -0500
add FreeBSD support
Add the necessary bits of code for FreeBSD.
diff --git a/tools/hal-storage-closetray.c b/tools/hal-storage-closetray.c
index 755ccd1..5e335a3 100644
--- a/tools/hal-storage-closetray.c
+++ b/tools/hal-storage-closetray.c
@@ -68,11 +68,6 @@ invalid_closetray_option (const char *op
exit (1);
}
-#ifdef __FreeBSD__
-#error Need FreeBSD specific changes here
-#endif
-
-
int
main (int argc, char *argv[])
{
diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
index ef8d1a9..12b15db 100644
--- a/tools/hal-storage-mount.c
+++ b/tools/hal-storage-mount.c
@@ -794,7 +794,7 @@ handle_mount (LibHalContext *hal_ctx,
printf ("Cannot chown '%s' to uid: %d, gid: %d\n", mount_dir,
calling_uid, calling_gid);
g_rmdir (mount_dir);
- unknown_error ();
+ unknown_error ("Failed to chown mount directory");
}
#endif
}
diff --git a/tools/hal-storage-shared.c b/tools/hal-storage-shared.c
index 74bd89e..63f831b 100644
--- a/tools/hal-storage-shared.c
+++ b/tools/hal-storage-shared.c
@@ -93,11 +93,14 @@ mtab_next (gpointer handle, char **mount
#ifdef __FreeBSD__
struct mtab_handle *mtab = handle;
- if (mtab->iter < mtab->n_mounts)
+ if (mtab->iter < mtab->n_mounts) {
+ if (mount_point != NULL) {
+ *mount_point = g_strdup (mtab->mounts[mtab->iter].f_mntonname);
+ }
return mtab->mounts[mtab->iter++].f_mntfromname;
- else
+ } else {
return NULL;
-#error TODO: set *mount_point to g_strdup()-ed value if mount_point!=NULL
+ }
#elif sun
static struct mnttab mnt;
diff-tree 3c85157116607be297269b2012e1f999d7dc0a1b (from ac568012ecb66c1040141732637436e7def46578)
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date: Tue Nov 28 17:29:50 2006 -0500
disable partutil for FreeBSD
Do not build partutil on FreeBSD.
diff --git a/partutil/Makefile.am b/partutil/Makefile.am
index 67b369b..400192f 100644
--- a/partutil/Makefile.am
+++ b/partutil/Makefile.am
@@ -1,4 +1,4 @@
-if !HALD_COMPILE_SOLARIS
+if !HALD_COMPILE_SOLARIS && !HALD_COMPILE_FREEBSD
INCLUDES = @GLIB_CFLAGS@
@@ -10,5 +10,4 @@ libpartutil_la_LIBADD = @GLIB_LIBS@ @PAR
clean-local :
rm -f *~
-
endif
diff-tree ac568012ecb66c1040141732637436e7def46578 (from 104e3c044e57b2f3d0b02797f169b8e44a77c91a)
Author: Jean-Yves Lefort <jylefort at FreeBSD.org>
Date: Tue Nov 28 17:29:30 2006 -0500
break out the PCI and USB IDs initialization into two separate functions
Separate the PCI and USB initialization code so that one can be initialized
without the other. Backward compatibility is preserved.
diff --git a/hald/ids.c b/hald/ids.c
index 223c8d4..7bfaf19 100644
--- a/hald/ids.c
+++ b/hald/ids.c
@@ -509,17 +509,27 @@ out:
return ret;
}
-
-void
-ids_init (void)
+void
+pci_ids_init (void)
{
/* Load /usr/share/hwdata/pci.ids */
pci_ids_load (HWDATA_DIR "/pci.ids");
+}
+void
+usb_ids_init (void)
+{
/* Load /usr/share/hwdata/usb.ids */
usb_ids_load (HWDATA_DIR "/usb.ids");
}
+void
+ids_init (void)
+{
+ pci_ids_init ();
+ usb_ids_init ();
+}
+
/* This, somewhat incomplete, list is from this sources:
* http://www.plasma-online.de/english/identify/serial/pnp_id_pnp.html
* http://www-pc.uni-regensburg.de/hardware/TECHNIK/PCI_PNP/pnpid.txt
diff --git a/hald/ids.h b/hald/ids.h
index c189320..34648b7 100644
--- a/hald/ids.h
+++ b/hald/ids.h
@@ -28,6 +28,10 @@
#include <glib.h>
+void pci_ids_init (void);
+
+void usb_ids_init (void);
+
void ids_init (void);
void
diff-tree 104e3c044e57b2f3d0b02797f169b8e44a77c91a (from 529e7e9b7fa2916e7eec58732ed7710de96ad6f7)
Author: Jean-Yves Lefort <jylefort at FreeBSD.org>
Date: Tue Nov 28 17:28:17 2006 -0500
add casts to fix build errors on FreeBSD
Cast relevant values to time_t to fix build problems on FreeBSD.
diff --git a/hald/logger.c b/hald/logger.c
index 3c63834..e067c19 100644
--- a/hald/logger.c
+++ b/hald/logger.c
@@ -172,7 +172,7 @@ logger_emit (const char *format, ...)
}
gettimeofday (&tnow, &tzone);
- tlocaltime = localtime (&tnow.tv_sec);
+ tlocaltime = localtime ((time_t *) &tnow.tv_sec);
strftime (tbuf, sizeof (tbuf), "%H:%M:%S", tlocaltime);
if (log_pid) {
@@ -228,7 +228,7 @@ logger_forward_debug (const char *format
vsnprintf (buf, sizeof (buf), format, args);
gettimeofday (&tnow, &tzone);
- tlocaltime = localtime (&tnow.tv_sec);
+ tlocaltime = localtime ((time_t *) &tnow.tv_sec);
strftime (tbuf, sizeof (tbuf), "%H:%M:%S", tlocaltime);
if (syslog_enabled)
diff-tree 529e7e9b7fa2916e7eec58732ed7710de96ad6f7 (from e147a0e4b27261b6e01896afb421fee3d727367d)
Author: Jean-Yves Lefort <jylefort at FreeBSD.org>
Date: Tue Nov 28 17:27:30 2006 -0500
add a osspec_privileged_init function for initializing backend objects prior to dropping root privileges
Add a osspec_privileged_init() function which can be used to do initialization
operations prior to dropping root privileges. This is needed for the FreeBSD
backend, but it currently a no-op on other platforms.
diff --git a/hald/hald.c b/hald/hald.c
index c30ff76..44ee2bf 100644
--- a/hald/hald.c
+++ b/hald/hald.c
@@ -578,6 +578,9 @@ main (int argc, char *argv[])
return 1;
}
+ /* initialize privileged operating system specific parts */
+ osspec_privileged_init ();
+
drop_privileges(0);
/* initialize operating system specific parts */
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index ee3d2b2..991dadf 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -260,6 +260,11 @@ mount_tree_changed_event (GIOChannel *ch
}
void
+osspec_privileged_init (void)
+{
+}
+
+void
osspec_init (void)
{
gchar path[HAL_PATH_MAX];
diff --git a/hald/osspec.h b/hald/osspec.h
index 787a66c..3f2096a 100644
--- a/hald/osspec.h
+++ b/hald/osspec.h
@@ -32,6 +32,9 @@
#include "device.h"
+/** Initialize the kernel specific parts of the daemon, as root */
+void osspec_privileged_init (void);
+
/** Initialize the kernel specific parts of the daemon */
void osspec_init (void);
diff --git a/hald/solaris/osspec.c b/hald/solaris/osspec.c
index f5903f3..f3c0fdb 100644
--- a/hald/solaris/osspec.c
+++ b/hald/solaris/osspec.c
@@ -50,6 +50,11 @@ osspec_init (void)
}
void
+osspec_privileged_init (void)
+{
+}
+
+void
hotplug_queue_now_empty (void)
{
if (hald_is_initialising) {
diff-tree e147a0e4b27261b6e01896afb421fee3d727367d (from 29dd4594ab47e5bfed42e86ac1befd402f4fd5b3)
Author: Jean-Yves Lefort <jylefort at FreeBSD.org>
Date: Tue Nov 28 17:25:04 2006 -0500
implement HAL_PROPERTY_TYPE_STRLIST support in merge_device_rewrite_cb and fix some potential NULL-pointer dereferences
Implement the needed code for HAL_PROPERTY_TYPE_STRLIST in the
merge_device_rewrite_cb callback function, and fix two potential NULL
pointer dereferences when dealing with string properties.
diff --git a/hald/device.c b/hald/device.c
index e0b8a7b..8b8c9e9 100644
--- a/hald/device.c
+++ b/hald/device.c
@@ -193,7 +193,7 @@ hal_property_set_string (HalProperty *pr
prop->type = HAL_PROPERTY_TYPE_STRING;
if (prop->v.str_value != NULL)
g_free (prop->v.str_value);
- prop->v.str_value = g_strdup (value);
+ prop->v.str_value = g_strdup (value != NULL ? value : "");
while (!g_utf8_validate (prop->v.str_value, -1,
(const char **) &endchar)) {
@@ -548,8 +548,16 @@ merge_device_rewrite_cb (HalDevice *sour
hal_device_property_set_double (ud->target, target_key, hal_property_get_double (p));
break;
- /* TODO: handle strlist */
-
+ case HAL_PROPERTY_TYPE_STRLIST:
+ {
+ GSList *l;
+
+ hal_device_property_strlist_clear (ud->target, target_key);
+ for (l = hal_property_get_strlist (p); l != NULL; l = l->next)
+ hal_device_property_strlist_append (ud->target, target_key, l->data);
+ }
+ break;
+
default:
HAL_WARNING (("Unknown property type %d", type));
break;
@@ -978,8 +986,7 @@ hal_device_property_set_string (HalDevic
return FALSE;
/* don't bother setting the same value */
- if (value != NULL &&
- strcmp (hal_property_get_string (prop), value) == 0)
+ if (strcmp (hal_property_get_string (prop), value != NULL ? value : "") == 0)
return TRUE;
hal_property_set_string (prop, value);
diff-tree 29dd4594ab47e5bfed42e86ac1befd402f4fd5b3 (from c2705ba7a4488b3a85cb1bdb502697bbfcbae5eb)
Author: Jean-Yves Lefort <jylefort at FreeBSD.org>
Date: Tue Nov 28 17:22:22 2006 -0500
add FreeBSD and Solaris support
Add the necessary backend bits so that these scripts work on FreeBSD and
Solaris as well as Linux.
diff --git a/hald/debug-hald.sh b/hald/debug-hald.sh
index acc91aa..bda8c94 100755
--- a/hald/debug-hald.sh
+++ b/hald/debug-hald.sh
@@ -1,6 +1,11 @@
#!/bin/sh
-export HALD_RUNNER_PATH=`pwd`/linux:`pwd`/linux/probing:`pwd`/linux/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/linux
+case `uname -s` in
+ FreeBSD) backend=freebsd ;;
+ SunOS) backend=solaris ;;
+ *) backend=linux ;;
+esac
+export HALD_RUNNER_PATH=`pwd`/$backend:`pwd`/$backend/probing:`pwd`/$backend/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/$backend
export PATH=`pwd`/../hald-runner:$PATH
if [ "$1" = "--skip-fdi-install" ] ; then
diff --git a/hald/run-hald.sh b/hald/run-hald.sh
index 7ffd4c9..ed32d1e 100755
--- a/hald/run-hald.sh
+++ b/hald/run-hald.sh
@@ -2,7 +2,12 @@
information_fdidir="../../hal-info/fdi"
-export HALD_RUNNER_PATH=`pwd`/linux:`pwd`/linux/probing:`pwd`/linux/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/linux
+case `uname -s` in
+ FreeBSD) backend=freebsd ;;
+ SunOS) backend=solaris ;;
+ *) backend=linux ;;
+esac
+export HALD_RUNNER_PATH=`pwd`/$backend:`pwd`/$backend/probing:`pwd`/$backend/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/$backend
export PATH=`pwd`/../hald-runner:$PATH
if [ "$1" = "--skip-fdi-install" ] ; then
diff --git a/hald/valgrind-hald.sh b/hald/valgrind-hald.sh
index 2b6a8fe..eab6e5c 100755
--- a/hald/valgrind-hald.sh
+++ b/hald/valgrind-hald.sh
@@ -1,6 +1,11 @@
#!/bin/sh
-export HALD_RUNNER_PATH=`pwd`/linux:`pwd`/linux/probing:`pwd`/linux/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/linux
+case `uname -s` in
+ FreeBSD) backend=freebsd ;;
+ SunOS) backend=solaris ;;
+ *) backend=linux ;;
+esac
+export HALD_RUNNER_PATH=`pwd`/$backend:`pwd`/$backend/probing:`pwd`/$backend/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/$backend
export PATH=`pwd`/../hald-runner:$PATH
if [ "$1" = "--skip-fdi-install" ] ; then
diff-tree c2705ba7a4488b3a85cb1bdb502697bbfcbae5eb (from 0e829dde483a5281b241f5db820cd5c3c3268c92)
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date: Tue Nov 28 17:20:47 2006 -0500
add FreeBSD support
Add PATH elements needed for FreeBSD.
diff --git a/hald-runner/main.c b/hald-runner/main.c
index b509ad7..3b170b3 100644
--- a/hald-runner/main.c
+++ b/hald-runner/main.c
@@ -52,7 +52,11 @@ parse_first_part(run_request *r, DBusMes
goto malformed;
dbus_message_iter_recurse(iter, &sub_iter);
/* Add default path for the programs we start */
+#if defined(__FreeBSD__)
+ tmpstr = g_strdup_printf("PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/X11R6/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:%s", getenv("PATH"));
+#else
tmpstr = g_strdup_printf("PATH=/sbin:/usr/sbin:/bin:/usr/bin:%s", getenv("PATH"));
+#endif
r->environment = get_string_array(&sub_iter, tmpstr);
/* Then argv */
diff-tree 0e829dde483a5281b241f5db820cd5c3c3268c92 (from b874d283f20be576c253187aa8541295434bdea3)
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date: Tue Nov 28 17:19:51 2006 -0500
add support for FreeBSD mount options
Add FreeBSD mount options for the various file system types.
diff --git a/fdi/policy/10osvendor/20-storage-methods.fdi b/fdi/policy/10osvendor/20-storage-methods.fdi
index 29e8cd0..6d14085 100644
--- a/fdi/policy/10osvendor/20-storage-methods.fdi
+++ b/fdi/policy/10osvendor/20-storage-methods.fdi
@@ -49,23 +49,28 @@
<append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-eject</append>
<!-- allow these mount options for all file systems -->
- <append key="volume.mount.valid_options" type="strlist">ro</append>
- <append key="volume.mount.valid_options" type="strlist">sync</append>
- <append key="volume.mount.valid_options" type="strlist">dirsync</append>
- <append key="volume.mount.valid_options" type="strlist">noatime</append>
- <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
- <append key="volume.mount.valid_options" type="strlist">noexec</append>
- <append key="volume.mount.valid_options" type="strlist">quiet</append>
- <append key="volume.mount.valid_options" type="strlist">remount</append>
- <append key="volume.mount.valid_options" type="strlist">exec</append>
- <!-- As this is removable media give some leeway -->
- <append key="volume.mount.valid_options" type="strlist">utf8</append>
- <append key="volume.mount.valid_options" type="strlist">shortname=</append>
- <append key="volume.mount.valid_options" type="strlist">codepage=</append>
- <append key="volume.mount.valid_options" type="strlist">iocharset=</append>
- <append key="volume.mount.valid_options" type="strlist">umask=</append>
- <append key="volume.mount.valid_options" type="strlist">uid=</append>
-
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.mount.valid_options" type="strlist">ro</append>
+ <append key="volume.mount.valid_options" type="strlist">sync</append>
+ <append key="volume.mount.valid_options" type="strlist">dirsync</append>
+ <append key="volume.mount.valid_options" type="strlist">noatime</append>
+ <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
+ <append key="volume.mount.valid_options" type="strlist">noexec</append>
+ <append key="volume.mount.valid_options" type="strlist">quiet</append>
+ <append key="volume.mount.valid_options" type="strlist">remount</append>
+ <append key="volume.mount.valid_options" type="strlist">exec</append>
+ <!-- As this is removable media give some leeway -->
+ <append key="volume.mount.valid_options" type="strlist">utf8</append>
+ <append key="volume.mount.valid_options" type="strlist">shortname=</append>
+ <append key="volume.mount.valid_options" type="strlist">codepage=</append>
+ <append key="volume.mount.valid_options" type="strlist">iocharset=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">ro</append>
+ <append key="volume.mount.valid_options" type="strlist">noexec</append>
+ </match>
</match>
</match>
@@ -123,26 +128,40 @@
<append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-eject</append>
<!-- allow these mount options for all file systems -->
- <append key="volume.mount.valid_options" type="strlist">ro</append>
- <append key="volume.mount.valid_options" type="strlist">sync</append>
- <append key="volume.mount.valid_options" type="strlist">dirsync</append>
- <append key="volume.mount.valid_options" type="strlist">noatime</append>
- <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
- <append key="volume.mount.valid_options" type="strlist">noexec</append>
- <append key="volume.mount.valid_options" type="strlist">quiet</append>
- <append key="volume.mount.valid_options" type="strlist">remount</append>
- <append key="volume.mount.valid_options" type="strlist">exec</append>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.mount.valid_options" type="strlist">ro</append>
+ <append key="volume.mount.valid_options" type="strlist">sync</append>
+ <append key="volume.mount.valid_options" type="strlist">dirsync</append>
+ <append key="volume.mount.valid_options" type="strlist">noatime</append>
+ <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
+ <append key="volume.mount.valid_options" type="strlist">noexec</append>
+ <append key="volume.mount.valid_options" type="strlist">quiet</append>
+ <append key="volume.mount.valid_options" type="strlist">remount</append>
+ <append key="volume.mount.valid_options" type="strlist">exec</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">ro</append>
+ <append key="volume.mount.valid_options" type="strlist">noexec</append>
+ </match>
<!-- allow these mount options for vfat -->
<match key="volume.fstype" string="vfat">
- <append key="volume.mount.valid_options" type="strlist">utf8</append>
- <append key="volume.mount.valid_options" type="strlist">shortname=</append>
- <append key="volume.mount.valid_options" type="strlist">codepage=</append>
- <append key="volume.mount.valid_options" type="strlist">iocharset=</append>
- <append key="volume.mount.valid_options" type="strlist">umask=</append>
- <append key="volume.mount.valid_options" type="strlist">dmask=</append>
- <append key="volume.mount.valid_options" type="strlist">fmask=</append>
- <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.mount.valid_options" type="strlist">utf8</append>
+ <append key="volume.mount.valid_options" type="strlist">shortname=</append>
+ <append key="volume.mount.valid_options" type="strlist">codepage=</append>
+ <append key="volume.mount.valid_options" type="strlist">iocharset=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ <append key="volume.mount.valid_options" type="strlist">dmask=</append>
+ <append key="volume.mount.valid_options" type="strlist">fmask=</append>
+ <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">longnames</append>
+ <append key="volume.mount.valid_options" type="strlist">shortnames</append>
+ <append key="volume.mount.valid_options" type="strlist">nowin95</append>
+ <append key"volume.mount.valid_options" type="strlist">-u=</append>
+ </match>
</match>
@@ -160,9 +179,16 @@
<!-- allow these mount options for ntfs -->
<match key="volume.fstype" string="ntfs">
- <append key="volume.mount.valid_options" type="strlist">uid=</append>
- <append key="volume.mount.valid_options" type="strlist">gid=</append>
- <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ <append key="volume.mount.valid_options" type="strlist">gid=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">-u=</append>
+ <append key="volume.mount.valid_options" type="strlist">-g=</append>
+ <append key="volume.mount.valid_options" type="strlist">-m=</append>
+ </match>
</match>
<!-- allow these mount options for ext3 -->
@@ -172,20 +198,33 @@
<!-- udf -->
<match key="volume.fstype" string="udf">
- <append key="volume.mount.valid_options" type="strlist">uid=</append>
- <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ </match>
</match>
<!-- iso9660 -->
<match key="volume.fstype" string="iso9660">
- <append key="volume.mount.valid_options" type="strlist">utf8</append>
- <append key="volume.mount.valid_options" type="strlist">uid=</append>
- <append key="volume.mount.valid_options" type="strlist">mode=</append>
- <append key="volume.mount.valid_options" type="strlist">iocharset=</append>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.mount.valid_options" type="strlist">utf8</append>
+ <append key="volume.mount.valid_options" type="strlist">uid=</append>
+ <append key="volume.mount.valid_options" type="strlist">mode=</append>
+ <append key="volume.mount.valid_options" type="strlist">iocharset=</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">extatt</append>
+ <append key="volume.mount.valid_options" type="strlist">gens</append>
+ <append key="volume.mount.valid_options" type="strlist">nojoliet</append>
+ <append key="volume.mount.valid_options" type="strlist">norrip</append>
+ <append key="volume.mount.valid_options" type="strlist">nostrictjoliet</append>
+ </match>
</match>
<!-- allow these unmount options -->
- <append key="volume.unmount.valid_options" type="strlist">lazy</append>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <append key="volume.unmount.valid_options" type="strlist">lazy</append>
+ </match>
</match>
diff-tree b874d283f20be576c253187aa8541295434bdea3 (from 88c3448a705e0f6bc23fce1ac5881caa87d6c26e)
Author: Jean-Yves Lefort <jylefort at FreeBSD.org>
Date: Tue Nov 28 17:16:59 2006 -0500
fix python shebang line
Correct the python shebang line so that python can be found otuside of
/usr/bin.
diff --git a/examples/locking.py b/examples/locking.py
index c70230f..621d148 100755
--- a/examples/locking.py
+++ b/examples/locking.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Simple program to test locking; will acquire a lock on the hal device
# object representing the computer.
diff --git a/tools/device-manager/hal-device-manager.in b/tools/device-manager/hal-device-manager.in
index b322114..dac4083 100644
--- a/tools/device-manager/hal-device-manager.in
+++ b/tools/device-manager/hal-device-manager.in
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
"""This is the main executable for DeviceManager. GTK+/Glade code is based
on simplepy from Shannon -jj Behrens <jjinux at yahoo.com>"""
More information about the hal-commit
mailing list