Re: Why we disable the USB link on platforms other than Linux?
- From: Roland van Laar <the_mip_rvl myrealbox com>
- To: gnome-pilot-list gnome org, Calvin Liu Sun COM
- Cc:
- Subject: Re: Why we disable the USB link on platforms other than Linux?
- Date: Fri, 24 Jun 2005 10:42:53 +0200
On Fri, 2005-06-24 at 16:17 +0800, Calvin Liu wrote:
> Hi, there,
>
> Here is a piece of code from gpilotd/gpilotd.c. If I'm correct, in line
> 971, g_assert_not_reached() will terminal the process on any platforms
> other than Linux.
> Why we have to do it?
The USB code specifically needs the /proc/bus/usb/devices file,
which isn't available on non-linux platforms such as FreeBSD.
For FreeBSD there is a patch, which didn't work for me:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/palm/gnomepilot2/files/patch-gpilotd__gpilotd.c?rev=1.2&content-type=text/x-cvsweb-markup
So.. it's a bit of a mess on non linux systems.
Roland
>
> } if (dev->type == PILOT_DEVICE_USB_VISOR) {
> #ifdef WITH_USB_VISOR
> #ifdef linux
> /* We want to watch the /proc/bus/usb/devices file once
> * per context, and then check all devices each time it
> is
> * woken up. */
> if (visor_timeout_id == -1) {
> visor_timeout_id = g_timeout_add (2000,
> visor_devices_timeout, context);
> }
> #else /* linux*/
> 971: g_assert_not_reached ();
> #endif /* linux */
> #endif /* WITH_USB_VISOR */
> dev->device_exists = FALSE;
> }
>
> Thanks.
> Calvin
>
> _______________________________________________
> gnome-pilot-list mailing list
> gnome-pilot-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-pilot-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]