]> git.ipfire.org Git - thirdparty/libvirt.git/commit
block_resize: Implement qemu monitor functions
authorOsier Yang <jyang@redhat.com>
Tue, 29 Nov 2011 07:34:53 +0000 (15:34 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 29 Nov 2011 13:45:11 +0000 (21:45 +0800)
commit4fa36f1392e0ca411c345e5f4c37c91182b750a0
treee68f6f7eaf6ba5f597dfb3c22092b2dd2238ab9f
parent7c80d074143494b35738c0bdad782618492e889c
block_resize: Implement qemu monitor functions

Implements functions for both HMP and QMP mode.

For HMP mode, qemu uses "M" as the units by default, so the passed "sized"
is divided by 1024.

For QMP mode, qemu uses "Bytes" as the units by default, the passed "sized"
is multiplied by 1024.

All of the monitor functions return -1 on failure, 0 on success, or -2 if
not supported.
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.h