mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
Fix arch detection for qemu-system-i386 with QMP
QEMU uses 'i386' for its 32-bit x86 architecture, but libvirt wants that to be 'i686', so we must fix it up Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
6bf55a9752
commit
6fea88a119
@ -2327,6 +2327,14 @@ qemuCapsInitQMP(qemuCapsPtr caps,
|
||||
if (!(caps->arch = qemuMonitorGetTargetArch(mon)))
|
||||
goto cleanup;
|
||||
|
||||
/* Map i386, i486, i586 to i686. */
|
||||
if (caps->arch[0] == 'i' &&
|
||||
caps->arch[1] != '\0' &&
|
||||
caps->arch[2] == '8' &&
|
||||
caps->arch[3] == '6' &&
|
||||
caps->arch[4] == '\0')
|
||||
caps->arch[1] = '6';
|
||||
|
||||
/* Currently only x86_64 and i686 support PCI-multibus. */
|
||||
if (STREQLEN(caps->arch, "x86_64", 6) ||
|
||||
STREQLEN(caps->arch, "i686", 4)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user