mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: cpu: Fix parsing of vendor_id
This patch fixes a problem that vendor_id attribute can not be defined when fallback attribute is not defined. If I define domain xml like below: <domain> <cpu> <model vendor_id='aaaabbbbcccc'>core2duo</model> </cpu> </domain> In dumpxml, vendor_id is not reflected: <domain> <cpu mode='custom' match='exact'> <model fallback='allow'>core2duo</model> </cpu> </domain> The expected output is: <domain> <cpu mode='custom' match='exact'> <model fallback='allow' vendor_id='aaaabbbbcccc'>core2duo</model> </cpu> </domain> If the fallback attribute and vendor_id attribute is defined at the same time, it's reflected as expected. Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
This commit is contained in:
parent
77d3a80974
commit
1190a82469
@ -300,6 +300,7 @@ virCPUDefParseXML(const xmlNodePtr node,
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (virXPathBoolean("boolean(./model[1]/@vendor_id)", ctxt)) {
|
||||
char *vendor_id;
|
||||
@ -327,7 +328,6 @@ virCPUDefParseXML(const xmlNodePtr node,
|
||||
def->vendor_id = vendor_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def->vendor = virXPathString("string(./vendor[1])", ctxt);
|
||||
if (def->vendor && !def->model) {
|
||||
|
Loading…
Reference in New Issue
Block a user