summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@web.de>2010-03-10 10:11:35 +0100
committerDanny Kukawka <danny.kukawka@web.de>2010-03-10 10:11:35 +0100
commita3ea90ad7c3d17888df173ffec84a4798264d88c (patch)
tree44d4d16434f9c35abf3ebbeb7162f6d53e9d8bd6
parentc81927e3575bba4b1dc7c2bd2ff8d40883239dae (diff)
parent597c1ffffd61a15a334ce42f2a569c59f0270bcb (diff)
downloadhal-a3ea90ad7c3d17888df173ffec84a4798264d88c.tar.gz
Merge branch 'master' of ssh://dkukawka@git.freedesktop.org/git/hal
-rw-r--r--hald/linux/addons/addon-imac-backlight.c3
-rw-r--r--hald/linux/addons/addon-macbookpro-backlight.c3
-rw-r--r--hald/linux/probing/probe-hiddev.c3
-rw-r--r--hald/linux/probing/probe-ieee1394-unit.c3
-rw-r--r--hald/linux/probing/probe-net-bluetooth.c4
-rw-r--r--hald/linux/probing/probe-printer.c3
-rw-r--r--hald/linux/probing/probe-smbios.c3
-rw-r--r--hald/linux/probing/probe-storage.c3
-rw-r--r--hald/linux/probing/probe-video4linux.c3
-rw-r--r--hald/linux/probing/probe-volume.c3
10 files changed, 20 insertions, 11 deletions
diff --git a/hald/linux/addons/addon-imac-backlight.c b/hald/linux/addons/addon-imac-backlight.c
index e8691929..54e4ea34 100644
--- a/hald/linux/addons/addon-imac-backlight.c
+++ b/hald/linux/addons/addon-imac-backlight.c
@@ -158,7 +158,8 @@ main (int argc, char **argv)
goto out;
}
- if (ioperm(0xB2, 0xB3, 1) < 0)
+ /* Allow access to ports 0xB2 and 0xB3 */
+ if (ioperm(0xB2, 2, 1) < 0)
{
HAL_ERROR (("ioperm failed (you should be root)."));
exit(1);
diff --git a/hald/linux/addons/addon-macbookpro-backlight.c b/hald/linux/addons/addon-macbookpro-backlight.c
index 2a6fef6f..c1bbbac1 100644
--- a/hald/linux/addons/addon-macbookpro-backlight.c
+++ b/hald/linux/addons/addon-macbookpro-backlight.c
@@ -507,7 +507,8 @@ main (int argc, char *argv[])
state = INREG(0x7ae4);
OUTREG(0x7ae4, state);
- if (ioperm (0x300, 0x304, 1) < 0) {
+ /* Allow access to porta 0x300 through 0x304 */
+ if (ioperm (0x300, 5, 1) < 0) {
HAL_ERROR (("ioperm failed (you should be root)."));
exit(1);
}
diff --git a/hald/linux/probing/probe-hiddev.c b/hald/linux/probing/probe-hiddev.c
index 45d2084f..bffc040e 100644
--- a/hald/linux/probing/probe-hiddev.c
+++ b/hald/linux/probing/probe-hiddev.c
@@ -57,11 +57,12 @@ main (int argc, char *argv[])
/* assume failure */
ret = 1;
+ dbus_error_init (&error);
+
udi = getenv ("UDI");
if (udi == NULL)
goto out;
- dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
goto out;
diff --git a/hald/linux/probing/probe-ieee1394-unit.c b/hald/linux/probing/probe-ieee1394-unit.c
index 70b0f863..aaa92e24 100644
--- a/hald/linux/probing/probe-ieee1394-unit.c
+++ b/hald/linux/probing/probe-ieee1394-unit.c
@@ -388,6 +388,8 @@ int main (int argc, char *argv[])
setup_logger ();
+ dbus_error_init (&error);
+
udi = getenv ("UDI");
if (udi == NULL)
goto out;
@@ -396,7 +398,6 @@ int main (int argc, char *argv[])
if (ieee1394_udi == NULL)
goto out;
- dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
goto out;
diff --git a/hald/linux/probing/probe-net-bluetooth.c b/hald/linux/probing/probe-net-bluetooth.c
index 0b1b912c..e911eea1 100644
--- a/hald/linux/probing/probe-net-bluetooth.c
+++ b/hald/linux/probing/probe-net-bluetooth.c
@@ -141,6 +141,8 @@ main (int argc, char *argv[])
DBusMessage *reply = NULL;
DBusError error;
+ dbus_error_init (&error);
+
udi = getenv ("UDI");
if (udi == NULL)
goto out;
@@ -151,8 +153,6 @@ main (int argc, char *argv[])
HAL_INFO (("Investigating '%s'", iface));
- dbus_error_init (&error);
-
if ((conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error)) == NULL)
goto out;
diff --git a/hald/linux/probing/probe-printer.c b/hald/linux/probing/probe-printer.c
index 91ed7bcd..7c6d1c61 100644
--- a/hald/linux/probing/probe-printer.c
+++ b/hald/linux/probing/probe-printer.c
@@ -66,6 +66,8 @@ main (int argc, char *argv[])
ret = 1;
setup_logger ();
+
+ dbus_error_init (&error);
udi = getenv ("UDI");
if (udi == NULL) {
@@ -73,7 +75,6 @@ main (int argc, char *argv[])
goto out;
}
- dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
HAL_ERROR (("ctx init failed"));
goto out;
diff --git a/hald/linux/probing/probe-smbios.c b/hald/linux/probing/probe-smbios.c
index 270021f6..3d2b216a 100644
--- a/hald/linux/probing/probe-smbios.c
+++ b/hald/linux/probing/probe-smbios.c
@@ -132,6 +132,8 @@ main (int argc, char *argv[])
ret = 1;
setup_logger ();
+
+ dbus_error_init (&error);
udi = getenv ("UDI");
if (udi == NULL) {
@@ -139,7 +141,6 @@ main (int argc, char *argv[])
goto out;
}
- dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
HAL_ERROR (("ctx init failed"));
goto out;
diff --git a/hald/linux/probing/probe-storage.c b/hald/linux/probing/probe-storage.c
index 824a82ee..dd524ca4 100644
--- a/hald/linux/probing/probe-storage.c
+++ b/hald/linux/probing/probe-storage.c
@@ -109,6 +109,8 @@ main (int argc, char *argv[])
/* assume failure */
ret = 1;
+ dbus_error_init (&error);
+
if ((udi = getenv ("UDI")) == NULL)
goto out;
if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
@@ -127,7 +129,6 @@ main (int argc, char *argv[])
else
only_check_for_fs = FALSE;
- dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
goto out;
diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c
index cf913c0f..7bc13e84 100644
--- a/hald/linux/probing/probe-video4linux.c
+++ b/hald/linux/probing/probe-video4linux.c
@@ -58,6 +58,8 @@ main (int argc, char *argv[])
setup_logger ();
+ dbus_error_init (&error);
+
device_file = getenv ("HAL_PROP_VIDEO4LINUX_DEVICE");
if (device_file == NULL)
goto out;
@@ -66,7 +68,6 @@ main (int argc, char *argv[])
if (udi == NULL)
goto out;
- dbus_error_init (&error);
ctx = libhal_ctx_init_direct (&error);
if (ctx == NULL)
goto out;
diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
index 0de1b918..7268fffd 100644
--- a/hald/linux/probing/probe-volume.c
+++ b/hald/linux/probing/probe-volume.c
@@ -318,6 +318,8 @@ main (int argc, char *argv[])
/* 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 @@ main (int argc, char *argv[])
fsusage = getenv ("HAL_PROP_VOLUME_FSUSAGE");
- dbus_error_init (&error);
if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
goto out;