[Nut-upsdev] ETIME on FreeBSD

Charles Lepple clepple at gmail.com
Sun Jan 17 13:34:07 UTC 2010


On Jan 17, 2010, at 5:09 AM, Arjen de Korte wrote:

> I don't think we even need make this platform specific. The only  
> thing we're interested in, is whether or not ETIME is defined. I've  
> added a preprocessor directive to only test for -ETIME if it is  
> defined.

It looks like the code path (if ETIME is not defined) is to fall  
through to a USB reset if -EPIPE happens, and usb_clear_halt() does  
not succeed.

Is this intentional, or should the #endif be after the block which  
calls usb_reset()?

(I understand that after a usb_reset(), the code needs to fall through  
to the usb->close() section since the device handle is no longer valid.)

I guess it's a personal preference of mine, but I think that any code  
that relies on falling off the end of a switch case (instead of ending  
with 'break') should have a brief comment to that effect.

Looks like r2247 built (no surprises there).



More information about the Nut-upsdev mailing list