[PATCH dfu-util] main: Simplify --detach handling by reusing existing code

Stefan Schmidt stefan at datenfreihafen.org
Wed Nov 16 14:43:55 CET 2011


On Sun, 2011-11-13 at 23:02, Tormod Volden wrote:
> From: Tormod Volden <debian.tormod at gmail.com>
> I have some issues with the recent --detach option addition:
> * It duplicates the existing detach code
> * It sends requests to an interface without claiming it first
> * It resets the device without checking bitWillDetach

Valid points in here. Maybe I was a bit to fast adding it. :)

> Can't we simply do it like this, use existing code instead?
> I do not have any devices that do the mode transition correctly,
> so I can not verify that it works.
> If the main motivation for this option is to inquire about devices
> which only show alternate interfaces after switching to DFU mode,
> then an alternative would be to list those if the user has not 
> specified one of them with the -a option. This way we may avoid
> adding the -e option altogether. Patch to follow.

While listing the alternative interfaces is the major point behinf
this chnage it is also nice to have it around for debugging. Not sure
if it really has much of a value besides that.

I need to think about this for a moment and will test out your

Stefan Schmidt

More information about the devel mailing list