From: Michael P. <mic...@gm...> - 2010-04-15 18:35:28
|
Pete Batard wrote: >> On 2010.04.15 16:32, Graeme Gill wrote: >> > It makes perfect sense if the aim is to have an API that abstracts >> > the implementation details away, and provides a higher level, >> > platform independent interface. >> >> In that case, we should probably rename detach/attach kernel to >> something less Linux bound, as referencing the Linux kernel is not >> abstract at all. Well, one way to deal with this question is as follows. Is there a kernel driver in Windows that we're not allowed to detach, or does it simply not exist? If the former, detach should return an error. If the latter, detach should return success and attach should return an error. The idea here is to return an error based on whether the post-conditions of the function (in the detach case, is there some foreign driver still blocking us from using libusb to its fullest potential) are satisfied, regardless of whether the function is a no-op. But I can deal with whichever way you decide to do it. The above just seems most logical to me. Michael |