Re: Syncing a Tungsten T via USB using gpilotd works
- From: Peter Dieth <peter dieth suedwest-aktiv de>
- To: JP Rosevear <jpr ximian com>
- Cc: gnome-pilot-list gnome org
- Subject: Re: Syncing a Tungsten T via USB using gpilotd works
- Date: 13 Jan 2003 14:53:53 +0100
> Would you be able to submit this as a patch in unified diff format?
Here we go.
But beware: this patch has a little bit the touch of a hack. :-)
Cheers,
Peter
--- gpilotd.c 2003-01-13 14:48:42.000000000 +0100
+++ gpilotd.c.ORI 2003-01-13 14:47:48.000000000 +0100
@@ -876,37 +876,8 @@
/* Check /proc/bus/usb/devices for a usb device */
f = fopen ("/proc/bus/usb/devices", "r");
-
+
while (fgets (line, 255, f) != NULL && !visor_exists) {
-
- /*
- * HACK_ON: identify the Tungsten based on the product id line
- *
- * (1) before pressing the hotsync button on the USBicraddle
- * $ cat /proc/bus/usb/devices > /tmp/before-sync.txt
- *
- * (2) after pressing the hotsync button on the USB craddle
- * $ cat /proc/bus/usb/devices > /tmp/after-sync.txt
- *
- * (3) difference is
- * $ diff /tmp/before-sync.txt /tmp/after-sync.txt
- * ...
- * > P: Vendor=0830 ProdID=0060 Rev= 1.00
- * ...
- *********************** This is Tungsten T !
- */
-
- if (line[0] == 'P') {
-#define TUNGSTEN_STRING "P: Vendor=0830 ProdID=0060 Rev= 1.00"
-
- if (!strncmp (line, TUNGSTEN_STRING, strlen(TUNGSTEN_STRING))) {
- g_message("Found a Tungsten T on USB bus!");
- visor_exists = TRUE;
- visor_net = TRUE;
- goto endloop;
- }
- }
-
if (line[0] != 'S')
continue;
@@ -919,9 +890,8 @@
}
}
}
-endloop:
+
fclose (f);
-
if (visor_exists) {
l = context->devices;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]