|
From: Tom H. <th...@cy...> - 2004-09-28 18:24:18
|
In message <014101c4a581$a0840f70$0401a8c0@dan>
"Daniel Miller \(IMI\)" <da...@im...> wrote:
> static int get_number_of_luns(usb_dev_handle *udev)
> {
> char xbuf ;
> // swap bytes around because u16 fields in
> // usb_control_msg() are big-endian
> int result = usb_control_msg(udev, // handle
> 0xA1, // requesttype
> 0xFE, // request
> 0, // value
> 0, // index
> &xbuf, // data pointer
> 1, // length
> 5000) ; // timeout
> if (result < 0)
> return result;
> result = (int) (xbuf) + 1 ;
> return result;
> }
>
> The A1/FE control message returns one byte. So it doesn't look, to me, as
> though get_number_of_luns() can fail to return a value...
But where does use_control_msg get the value of xbuf from?
Given that this is obviously originating from a USB device it
is possible that there is some ioctl involved that valgrind
doesn't understand - do you get any warnings about ioctls?
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|