On 05/15/2009 05:58 PM, André Welter wrote:
Hi everyone!
I'm new to this list and I joined because I stumbled upon a problem I
could not find mentioned anywhere.
I have a usb device (a bluetooth dongle) that reports a product id of
0x0000. When I try to attach this to a domain I get a "missing product"
error.
I checked the sources (0.6.3) and found in domain_conf.c lines 1645
following a check for a product id different from 0. If I remove this
check and recompile everything works fine. I can attach the device to
the virtual machine and it is recognized.
I don't know the background of this check and if disabling it has any
negative consequences so I would be happy about any comments.
Sounds like the code just wasn't expecting '0' to be a valid product
code. The check that is tripping you up on is assuming that if product
== 0, the user didn't specify any product in the xml.
The thing to do is to initialize 'product = -1' at the beginning of that
function (and add a quick comment that '0' is a valid value), and then
update the checks at the end of the function accordingly.
- Cole