HAL mini-patch

Martin Waitz tali at admingilde.org
Fri Dec 19 02:21:16 EET 2003


hi :)

another patch... :)

with this one, hal finds pci.ids on debian, too


Index: configure.in
===================================================================
RCS file: /cvs/hal/hal/configure.in,v
retrieving revision 1.5
diff -u -p -r1.5 configure.in
--- configure.in	14 Dec 2003 21:22:43 -0000	1.5
+++ configure.in	19 Dec 2003 00:19:12 -0000
@@ -24,6 +25,20 @@ fi
 AC_SUBST(DBUS_SYS_DIR)
 AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [Where system.d dir for DBUS is])
 
+AC_ARG_WITH(hwdata, [  --with-hwdata=<dir>     where PCI and USB IDs are found])
+if ! test -z "$with_hwdata" ; then
+   HWDATA_DIR="$with_hwdata"
+else
+   for dir in /usr/share/hwdata /usr/share/misc; do
+      AC_CHECK_FILE($dir/pci.ids,HWDATA_DIR=$dir)
+   done
+fi
+if test -z "$HWDATA_DIR"; then
+   AC_ERROR(cannot find pci.ids. Use --with-hwdata to specify location)
+fi
+AC_SUBST(HWDATA_DIR)
+AC_DEFINE_UNQUOTED(HWDATA_DIR, "$HWDATA_DIR", [Where PCI and USB IDs are found])
+
 
 # Taken from dbus
 AC_ARG_ENABLE(ansi,             [  --enable-ansi         enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
Index: hald/linux/linux_pci.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/linux_pci.c,v
retrieving revision 1.1
diff -u -p -r1.1 linux_pci.c
--- hald/linux/linux_pci.c	14 Dec 2003 21:22:43 -0000	1.1
+++ hald/linux/linux_pci.c	19 Dec 2003 00:19:13 -0000
@@ -818,8 +818,7 @@ void linux_pci_init()
     drivers_collect("pci");
 
     /* Load /usr/share/hwdata/pci.ids */
-    /** @todo Hardcoding path to pci.ids is a hack */
-    pci_ids_load("/usr/share/hwdata/pci.ids");
+    pci_ids_load(HWDATA_DIR "/pci.ids");
 }
 
 /** Shutdown function for PCI handling
Index: hald/linux/linux_usb.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/linux_usb.c,v
retrieving revision 1.1
diff -u -p -r1.1 linux_usb.c
--- hald/linux/linux_usb.c	14 Dec 2003 21:22:43 -0000	1.1
+++ hald/linux/linux_usb.c	19 Dec 2003 00:19:13 -0000
@@ -1178,8 +1178,7 @@ void linux_usb_init()
     drivers_collect("usb");
 
     /* Load /usr/share/hwdata/usb.ids */
-    /** @todo Hardcoding path to usb.ids is a hack */
-    usb_ids_load("/usr/share/hwdata/usb.ids");
+    usb_ids_load(HWDATA_DIR "/usb.ids");
 
     /* Parse /proc/bus/usb/devices */
 


-- 
CU,		  / Friedrich-Alexander University Erlangen, Germany
Martin Waitz	//  Department of Computer Science 3       _________
______________/// - - - - - - - - - - - - - - - - - - - - ///
dies ist eine manuell generierte mail, sie beinhaltet    //
tippfehler und ist auch ohne grossbuchstaben gueltig.   /
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xdg/attachments/20031219/c776ce77/attachment.pgp 


More information about the xdg mailing list