]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Update QEMU device_add command in JSON mode
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 14 Apr 2010 15:02:37 +0000 (16:02 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 15 Apr 2010 17:08:04 +0000 (18:08 +0100)
commitdb336caa581fedbc729f4e177fa858968564db86
tree5f7315c047560d5891cc1c8016883abb439a38bc
parentfde060b8f52ab3a2908d9e5f4b71f0070aa32476
Update QEMU device_add command in JSON mode

The device_add command was added in JSON mode in a way I didn't
expect. Instead of passing the normal device string to the JSON
command:

    { "execute": "device_add", "arguments": { "device": "ne2k_pci,id=nic.1,netdev=net.1" } }

We need to split up the device string into a full JSON object

    { "execute": "device_add", "arguments": { "driver": "ne2k_pci", "id": "nic.1", "netdev": "net.1" } }

* src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Rename the
  qemuCommandLineParseKeywords method to qemuParseKeywords
  and export it to monitor
* src/qemu/qemu_monitor_json.c: Split up device string into
  a JSON object for device_add command
src/qemu/qemu_conf.c
src/qemu/qemu_conf.h
src/qemu/qemu_monitor_json.c