diff -u -r hal-0.5.14/configure.in src/hal-0.5.14/configure.in --- hal-0.5.14/configure.in 2009-08-24 14:42:29.000000000 +0200 +++ src/hal-0.5.14/configure.in 2011-12-19 20:39:54.000000000 +0100 @@ -479,9 +479,6 @@ fi AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"]) -USE_LIBUSB20=no -USE_LIBUSB=no -LIBUSB20_LIBS="" AC_ARG_WITH([backend], AS_HELP_STRING([--with-backend=], [backend to use (linux/solaris/freebsd/dummy)]), @@ -510,21 +507,25 @@ AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris]) AC_SUBST(HALD_BACKEND) if test "x$HALD_BACKEND" = "xfreebsd"; then - AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no]) -fi -if test "x$USE_LIBUSB20" = "xno"; then - AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB=yes], [USE_LIBUSB=no]) -fi -AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB20" = "xyes"]) -AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_LIBUSB" = "xyes"]) -if test "x$USE_LIBUSB20" = "xyes"; then - AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20]) - LIBUSB20_LIBS="-lusb20" -elif test "x$USE_LIBUSB" = "xyes"; then - AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20]) - LIBUSB20_LIBS="-lusb" + USE_BSDLIBUSB20=no + USE_BSDLIBUSB=no + LIBUSB20_LIBS="" + AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_BSDLIBUSB20=yes], [USE_BSDLIBUSB20=no]) + if test "x$USE_BSDLIBUSB20" = "xno"; then + AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_BSDLIBUSB=yes], [USE_BSDLIBUSB=no]) + fi + AM_CONDITIONAL([HAVE_LIBUSB20],[test "x$USE_BSDLIBUSB20" = "xyes" -o "x$USE_BSDLIBUSB" = "xyes"]) + if test "x$USE_BSDLIBUSB20" = "xyes"; then + AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20]) + LIBUSB20_LIBS="-lusb20" + elif test "x$USE_BSDLIBUSB" = "xyes"; then + AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libsub20]) + LIBUSB20_LIBS="-lusb" + fi + AC_SUBST(LIBUSB20_LIBS) +else + AM_CONDITIONAL([HAVE_LIBUSB20], [false]) fi -AC_SUBST(LIBUSB20_LIBS) dnl DBUS API is subject to changes AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE, [], [DBUS API is subject to change]) diff -u -r hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi src/hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi --- hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi 2009-06-26 09:28:39.000000000 +0200 +++ src/hal-0.5.14/fdi/policy/10osvendor/10-x11-input.fdi 2011-12-19 20:39:54.000000000 +0100 @@ -2,6 +2,12 @@ + + + evdev + + evdev @@ -16,6 +22,14 @@ + + mouse + + evdev + + + @@ -32,5 +46,18 @@ evdev + + + + + + + + + false + false + diff -u -r hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi src/hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi --- hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi 2009-11-05 15:09:01.000000000 +0100 +++ src/hal-0.5.14/fdi/policy/10osvendor/20-storage-methods.fdi 2011-12-19 20:39:54.000000000 +0100 @@ -99,6 +99,11 @@ + + + true + + diff -u -r hal-0.5.14/hal.conf.in src/hal-0.5.14/hal.conf.in --- hal-0.5.14/hal.conf.in 2009-02-04 23:07:23.000000000 +0100 +++ src/hal-0.5.14/hal.conf.in 2011-12-19 20:39:54.000000000 +0100 @@ -25,7 +25,41 @@ send_interface="org.freedesktop.Hal.Device"/> + + + + + + + + + + + + + + + + + + + + + #include #include -#include +#include #include #include #include @@ -58,6 +58,8 @@ setup_logger (); + dbus_error_init (&error); + device_file = getenv ("HAL_PROP_VIDEO4LINUX_DEVICE"); if (device_file == NULL) goto out; @@ -66,7 +68,6 @@ if (udi == NULL) goto out; - dbus_error_init (&error); ctx = libhal_ctx_init_direct (&error); if (ctx == NULL) goto out; diff -u -r hal-0.5.14/hald/linux/probing/probe-volume.c src/hal-0.5.14/hald/linux/probing/probe-volume.c --- hal-0.5.14/hald/linux/probing/probe-volume.c 2009-08-24 14:42:30.000000000 +0200 +++ src/hal-0.5.14/hald/linux/probing/probe-volume.c 2011-12-19 20:39:54.000000000 +0100 @@ -318,6 +318,8 @@ /* assume failure */ ret = 1; + dbus_error_init (&error); + if ((udi = getenv ("UDI")) == NULL) goto out; if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL) @@ -346,7 +348,6 @@ fsusage = getenv ("HAL_PROP_VOLUME_FSUSAGE"); - dbus_error_init (&error); if ((ctx = libhal_ctx_init_direct (&error)) == NULL) goto out; diff -u -r hal-0.5.14/hald/util.h src/hal-0.5.14/hald/util.h --- hal-0.5.14/hald/util.h 2009-04-03 16:31:34.000000000 +0200 +++ src/hal-0.5.14/hald/util.h 2011-12-19 20:39:54.000000000 +0100 @@ -38,7 +38,7 @@ #endif #define HAL_NAME_MAX 256 -#define HAL_PATH_MAX 512 +#define HAL_PATH_MAX 4096 gboolean hal_util_remove_trailing_slash (gchar *path); diff -u -r hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux src/hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux --- hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux 2008-11-10 11:14:12.000000000 +0100 +++ src/hal-0.5.14/tools/linux/hal-system-killswitch-get-power-linux 2011-12-19 20:39:54.000000000 +0100 @@ -8,11 +8,6 @@ # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -DELL_WCTL=/usr/bin/dellWirelessCtl -if [ -x "/usr/sbin/dellWirelessCtl" ]; then - DELL_WCTL=/usr/sbin/dellWirelessCtl -fi - if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then value="`hal-system-sonypic getbluetooth`" @@ -22,25 +17,6 @@ exit 1 fi exit ${value} - elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then - if [ -x "$DELL_WCTL" ]; then - # TODO: write our own binary that links with libsmbios? - $DELL_WCTL --st_bt - value=$? - if [ "$value" = "0" ]; then - exit 1 - elif [ "$value" = "1" ]; then - exit 0 - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl returned $value" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2 - exit 1 - fi elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -r "$HAL_PROP_LINUX_SYSFS_PATH" ]; then read value < $HAL_PROP_LINUX_SYSFS_PATH 2> /dev/null if [ $? -eq 0 ]; then @@ -53,56 +29,6 @@ else echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 echo "Access type not supported" >&2 - exit 1 - fi -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then - if [ -x "$DELL_WCTL" ]; then - # TODO: write our own binary that links with libsmbios? - $DELL_WCTL --st_wlan - value=$? - if [ "$value" = "0" ]; then - exit 1 - elif [ "$value" = "1" ]; then - exit 0 - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl returned $value" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "Access type not supported" >&2 - exit 1 - fi -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then - if [ -x "$DELL_WCTL" ]; then - # TODO: write our own binary that links with libsmbios? - $DELL_WCTL --st_wwan - value=$? - if [ "$value" = "0" ]; then - exit 1 - elif [ "$value" = "1" ]; then - exit 0 - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl returned $value" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "Access type not supported" >&2 exit 1 fi else diff -u -r hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux src/hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux --- hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux 2008-11-10 11:14:12.000000000 +0100 +++ src/hal-0.5.14/tools/linux/hal-system-killswitch-set-power-linux 2011-12-19 20:39:54.000000000 +0100 @@ -8,11 +8,6 @@ # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -DELL_WCTL=/usr/bin/dellWirelessCtl -if [ -x "/usr/sbin/dellWirelessCtl" ]; then - DELL_WCTL=/usr/sbin/dellWirelessCtl -fi - if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then hal-system-sonypic setbluetooth $value @@ -23,26 +18,6 @@ exit 1 fi exit 0 - elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then - if [ -x "$DELL_WCTL" ]; then - # TODO: write our own binary that links with libsmbios? - if [ "$value" = "true" ]; then - $DELL_WCTL --bt 1 - ret=$? - else - $DELL_WCTL --bt 0 - ret=$? - fi - if [ "$ret" != "0" ]; then - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl returned $ret" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2 - exit 1 - fi elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = thinkpad -a -w "$HAL_PROP_LINUX_SYSFS_PATH" ]; then if [ "$value" = "true" ]; then bit=1; @@ -59,60 +34,6 @@ else echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 echo "Access type not supported" >&2 - exit 1 - fi -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then - if [ -x "$DELL_WCTL" ]; then - # As a side effect we disable the physical kill switch - # TODO: write our own binary that links with libsmbios? - if [ "$value" = "true" ]; then - $DELL_WCTL --sw_wlan 0 --wlan 1 - ret=$? - else - $DELL_WCTL --sw_wlan 0 --wlan 0 - ret=$? - fi - if [ "$ret" != "0" ]; then - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl returned $ret" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "Access type not supported" >&2 - exit 1 - fi -elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wwan" ]; then - if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then - if [ -x "$DELL_WCTL" ]; then - # As a side effect we disable the physical kill switch - # TODO: write our own binary that links with libsmbios? - if [ "$value" = "true" ]; then - $DELL_WCTL --sw_wwan 0 --wwan 1 - ret=$? - else - $DELL_WCTL --sw_wwan 0 --wwan 0 - ret=$? - fi - if [ "$ret" != "0" ]; then - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl returned $ret" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "dellWirelessCtl ($DELL_WCTL) not available or executable" >&2 - exit 1 - fi - else - echo "org.freedesktop.Hal.Device.KillSwitch.NotSupported" >&2 - echo "Access type not supported" >&2 exit 1 fi else