[libvirt] [PATCH] Fix arch detection for qemu-system-i386 with QMP
Eric Blake
eblake at redhat.com
Wed Oct 31 20:22:21 UTC 2012
On 10/31/2012 10:50 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> 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 at redhat.com>
> ---
> src/qemu/qemu_capabilities.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
ACK.
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 9f15162..271273c 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -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)) {
>
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121031/9e69f636/attachment-0001.sig>
More information about the libvir-list
mailing list