Hi list, I'm in the process of setting up OpenCT on OpenBSD. With the unmodified code the application compiled cleanly, though was not usable. I've got a collection of different USB-Tokens for testing.
The reason is that OpenBSD doesn't return the control-endpoint of the USB device, but the device itself. This is /dev/ugen0. OpenCT wants to communicate with the endpoint /dev/ugen0.00 though. Naturally, appending .00 to the nodes that scan_usb finds renders the whole thing functional. I suspect that Free/NetBSD maybe return .00 by default, so stat'ing it works without problems. Would be nice if someone running one of those systems could confirm that if its the case. Attached you find a patch which remedies the problem by use of a preprocessor directive. All the best, /Markus Schatzl
--- src/ifd/sys-bsd.c.orig Fri Apr 21 08:37:58 2006 +++ src/ifd/sys-bsd.c Tue Jun 13 03:56:10 2006 @@ -390,9 +390,13 @@ if (!(driver = ifd_driver_for_id(&id))) continue; - +#ifdef __OpenBSD__ snprintf(device, sizeof(device), + "/dev/%s.00", device_info.udi_devnames[0]); +#else + snprintf(device, sizeof(device), "/dev/%s", device_info.udi_devnames[0]); +#endif /* __OpenBSD__ */ ifd_spawn_handler(driver, device, -1); }
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel