From: Johannes E. <joh...@er...> - 2003-05-10 19:54:41
|
On Sat, May 10, 2003, Brad Hards <bh...@bi...> wrote: > On Fri, 9 May 2003 02:19 am, Johannes Erdfelt wrote: > > usb_error_errno. It's like errno, but different. > I assumed that since it wasn't exported, it shouldn't be used. In any case, Not exported what way? > I'm still having trouble with it - the error code is 0x0. Can you prove an > explanation or example? Looking at the code it's fundamentally flawed. We try to be helpful by making the error message a bit more friendly, but the code fails to set usb_error_errno. > > The problem with it right now is that errors from the different > > platforms aren't normalized. So the same error on different platforms > > might result in different error codes. > So even if I could make it work, I'd have to condition the explanation on the > usb_error_errno and platform? Possibly. This is one of the poorly thought out and poorly implemented parts of libusb. I think we can fix it acceptably for 0.1 and redesign it for 1.0. I think we should normalize the all of the platforms in 0.1 to something similar to the error codes the Linux kernel will return, and thusly libusb will return. I'm thinking Linux because I'm more familiar with it and it has been used more for libusb 0.1. Also, I should fix USB_ERROR_STR so we can set usb_error_errno to something meaningful. JE |