[fprint] 4000b image error

Vasily Khoruzhick anarsoul at gmail.com
Fri Nov 9 06:29:09 PST 2012


On Fri, Nov 9, 2012 at 5:19 PM, Timo Teras <timo.teras at iki.fi> wrote:
> On Fri, 9 Nov 2012 17:08:16 +0300 Vasily Khoruzhick
> <anarsoul at gmail.com> wrote:
>
>> That could be an alignment issue, could you guys try attached patch?
>> At least it should not break anything.
>
> It should not be. The structure is aligned properly - though adding the
> packed attribute is probably a good idea.

I mean structure fields alignment.
sizeof() and offset of fields could differ on different platforms if
you do not specify "packed" attribute
explicitly

> The length mismatch does not come from the structure size.

Hmm, libusb_fill_bulk_transfer receives sizeof(struct uru4k_image) as
a buffer size argument

> The USB data transfer is always short (less than requested) due to how
> the device works. And in this case the USB stack returns actually one
> more byte than what the device sent. So it really sounds like USB stack
> issue (kernel or libusb) that triggers on the target hardware only.

Ok.

> - Timo

Regards
Vasily


More information about the fprint mailing list