/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/xml.c

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-08 22:26:12 UTC
  • Revision ID: csa@suren.me-20160308222612-s9b5awlqqyxu6fkq
Fix device detection code

Show diffs side-by-side

added added

removed removed

Lines of Context:
1294
1294
    xmlXPathObjectPtr nodes;
1295
1295
    xmlChar xpath_query[64];
1296
1296
 
1297
 
    xmlStrPrintf(xpath_query, sizeof(xpath_query), (xmlChar*)"/devices/device[@vendor=%x and @device=%x]/@model", vendor_id, device_id);
 
1297
    xmlStrPrintf(xpath_query, sizeof(xpath_query), (xmlChar*)"/devices/device[@vendor=\"%04x\" and @device=\"%04x\"]/@model", vendor_id, device_id);
1298
1298
 
1299
1299
    data_dir = getenv("PCILIB_DATA_DIR");
1300
1300
    if (!data_dir) data_dir = PCILIB_DATA_DIR;