summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Zeuthen <david@fubar.dk>2004-03-14 18:21:08 +0000
committerDavid Zeuthen <david@fubar.dk>2004-03-14 18:21:08 +0000
commit5ee5a1288680918d3b1dbb36baa3a0dca06fc9cd (patch)
tree5d078aac62ad6b41ffdd7dd513a4af5dcffb37b2
parentb06fb5619ff499f826cb8dbbd853671bdedb87ee (diff)
Just ignore if we can't open /proc/bus/usb/devices
Just ignore if we can't open /proc/bus/usb/devices Print out nice error if hald is not running
-rw-r--r--ChangeLog15
-rw-r--r--hald/linux/linux_usb.c3
-rw-r--r--hald/linux/usb_bus_device.c3
-rw-r--r--tools/device-manager/DeviceManager.py7
4 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 81ce297d..a5e612ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2004-03-14 Martin Waitz <tali@admingilde.org>
+
+ * hald/linux/linux_usb.c (usb_proc_parse): Just ignore if we can't
+ open /proc/bus/usb/devices
+
+ * hald/linux/usb_bus_device.c (usb_proc_parse): Just ignore if we
+ can't open /proc/bus/usb/devices
+
+ * tools/device-manager/DeviceManager.py: Print out nice error if hald
+ is not running
+
+2004-03-14 David Zeuthen <david@fubar.dk>
+
+ * doc/TODO: Updated TODO file
+
2004-03-14 David Zeuthen <david@fubar.dk>
Added first stab of rewrite of linux specific parts - the new
diff --git a/hald/linux/linux_usb.c b/hald/linux/linux_usb.c
index 9d3e638a..0fdbe3fc 100644
--- a/hald/linux/linux_usb.c
+++ b/hald/linux/linux_usb.c
@@ -476,7 +476,8 @@ usb_proc_parse ()
("/proc/bus/usb/devices_please-use-sysfs-instead",
"r");
if (f == NULL) {
- DIE (("Couldn't open /proc/bus/usb/devices"));
+ /*DIE (("Couldn't open /proc/bus/usb/devices"));*/
+ return;
}
while (!feof (f)) {
diff --git a/hald/linux/usb_bus_device.c b/hald/linux/usb_bus_device.c
index f7198356..e9e827dd 100644
--- a/hald/linux/usb_bus_device.c
+++ b/hald/linux/usb_bus_device.c
@@ -477,7 +477,8 @@ usb_proc_parse ()
("/proc/bus/usb/devices_please-use-sysfs-instead",
"r");
if (f == NULL) {
- DIE (("Couldn't open /proc/bus/usb/devices"));
+ /*DIE (("Couldn't open /proc/bus/usb/devices"));*/
+ return;
}
while (!feof (f)) {
diff --git a/tools/device-manager/DeviceManager.py b/tools/device-manager/DeviceManager.py
index 8f8d76db..f0e7ffb6 100644
--- a/tools/device-manager/DeviceManager.py
+++ b/tools/device-manager/DeviceManager.py
@@ -1,5 +1,6 @@
"""This file contains the DeviceManager class."""
+import sys
import gobject
import gtk
import gnome.ui
@@ -43,7 +44,11 @@ class DeviceManager(LibGladeApplication):
"/org/freedesktop/Hal/Manager")
# Add listeners for all devices
- device_names = self.hal_manager.GetAllDevices()
+ try:
+ device_names = self.hal_manager.GetAllDevices()
+ except:
+ sys.exit("Could not get device list. Make sure hald is running")
+
for name in device_names:
self.bus.add_signal_receiver(self.device_changed,
"org.freedesktop.Hal.Device",