Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-pda/gnome-pilot/files: gnome-pilot-2.0.16-hal-0.5.11.patch
Date: Wed, 06 Aug 2008 22:28:29
Message-Id: E1KQrUZ-00036E-1q@stork.gentoo.org
1 eva 08/08/06 22:28:27
2
3 Added: gnome-pilot-2.0.16-hal-0.5.11.patch
4 Log:
5 add patch to fix detection with hal-0.5.11, bug #231678.
6 (Portage version: 2.2_rc3/cvs/Linux 2.6.26-gentoo-mactel x86_64)
7
8 Revision Changes Path
9 1.1 app-pda/gnome-pilot/files/gnome-pilot-2.0.16-hal-0.5.11.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/gnome-pilot/files/gnome-pilot-2.0.16-hal-0.5.11.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-pda/gnome-pilot/files/gnome-pilot-2.0.16-hal-0.5.11.patch?rev=1.1&content-type=text/plain
13
14 Index: gnome-pilot-2.0.16-hal-0.5.11.patch
15 ===================================================================
16 --- gpilotd/gpilotd.c-old 2008-07-13 21:52:04.000000000 +1000
17 +++ gpilotd/gpilotd.c 2008-07-13 21:53:30.000000000 +1000
18 @@ -1079,7 +1079,7 @@
19 hal_device_added (LibHalContext *ctx, const char *udi)
20 {
21 gboolean visor_net = FALSE;
22 - char *bus, *match_str;
23 + char *bus, *platform, *match_str;
24 int vendor_id, product_id, i;
25 GPilotDevice *device;
26 DBusError error;
27 @@ -1090,15 +1090,23 @@
28
29 load_devices_xml ();
30
31 - /* HAL match rule: we look for info.bus == 'usb_device'
32 + /* HAL match rule: we look for pda.platform == 'palm'
33 + * (or the legacy info.bus == 'usb_device')
34 * and then try to match the usb_device.product_id and usb_device.vendor_id
35 * against the list in devices.xml.
36 */
37 - if (!(bus = libhal_device_get_property_string (hal_ctx, udi, "info.bus", NULL)))
38 + if (platform = libhal_device_get_property_string (hal_ctx, udi, "pda.platform", NULL)) {
39 + if (strcmp (platform, "palm") != 0) {
40 + libhal_free_string (platform);
41 return;
42 - if (strcmp (bus, "usb_device") != 0) {
43 + }
44 + } else if (bus = libhal_device_get_property_string (hal_ctx, udi, "info.bus", NULL)) {
45 + if (strcmp (bus, "usb_device") != 0) {
46 libhal_free_string (bus);
47 return;
48 + }
49 + } else {
50 + return;
51 }
52
53 dbus_error_init (&error);