diff options
| author | Suren A. Chilingaryan <csa@suren.me> | 2016-03-08 23:26:12 +0100 | 
|---|---|---|
| committer | Suren A. Chilingaryan <csa@suren.me> | 2016-03-08 23:26:12 +0100 | 
| commit | 3efe83956be40c98f3ac44cd186a056ec5cf0066 (patch) | |
| tree | 4ff877a984667d22197cc002e22a365f774a8327 /pcilib | |
| parent | bbcb2c11b8f47104176d1129e703ce8586dd4407 (diff) | |
Fix device detection code
Diffstat (limited to 'pcilib')
| -rw-r--r-- | pcilib/xml.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/pcilib/xml.c b/pcilib/xml.c index 467c9c7..c514f40 100644 --- a/pcilib/xml.c +++ b/pcilib/xml.c @@ -1294,7 +1294,7 @@ char *pcilib_detect_xml_model(pcilib_t *ctx, unsigned int vendor_id, unsigned in      xmlXPathObjectPtr nodes;      xmlChar xpath_query[64]; -    xmlStrPrintf(xpath_query, sizeof(xpath_query), (xmlChar*)"/devices/device[@vendor=%x and @device=%x]/@model", vendor_id, device_id); +    xmlStrPrintf(xpath_query, sizeof(xpath_query), (xmlChar*)"/devices/device[@vendor=\"%04x\" and @device=\"%04x\"]/@model", vendor_id, device_id);      data_dir = getenv("PCILIB_DATA_DIR");      if (!data_dir) data_dir = PCILIB_DATA_DIR; | 
