On Mon, Aug 13, 2018 at 06:00:18PM +0200, Peter Krempa wrote:
With blockdev we can use the full range of commands to manipulate the tray and the medium separately. Implement monitor code for this. Schema testing done in the qemumonitorjsontest allows us to verify that we generate the commands correctly. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 51 +++++++++++++++++++ src/qemu/qemu_monitor.h | 14 ++++++ src/qemu/qemu_monitor_json.c | 114 +++++++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_monitor_json.h | 18 +++++++ tests/qemumonitorjsontest.c | 8 +++ 5 files changed, 205 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 49dc478f5b..0a29ad7502 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4336,6 +4336,57 @@ qemuMonitorBlockdevDel(qemuMonitorPtr mon, return qemuMonitorJSONBlockdevDel(mon, nodename); } +int +qemuMonitorBlockdevTrayOpen(qemuMonitorPtr mon, + const char *id, + bool force) +{ + VIR_DEBUG("id=%s force=%d", id, force); + + QEMU_CHECK_MONITOR(mon); + + return qemuMonitorJSONBlockdevTrayOpen(mon, id, force); +} + + +int +qemuMonitorBlockdevTrayClose(qemuMonitorPtr mon, + const char *id) +{ + VIR_DEBUG("id=%s", id); + + QEMU_CHECK_MONITOR(mon); + + return qemuMonitorJSONBlockdevTrayClose(mon, id); +} + + +int +qemuMonitorBlockdevMediumRemove(qemuMonitorPtr mon, + const char *id) +{ + VIR_DEBUG("id=%s", id); + + QEMU_CHECK_MONITOR(mon); + + return qemuMonitorJSONBlockdevMediumRemove(mon, id); +} + + +
Extra empty line.
+int +qemuMonitorBlockdevMediumInsert(qemuMonitorPtr mon, + const char *id, + const char *nodename) +{ + VIR_DEBUG("id=%s nodename=%s", id, nodename); + + QEMU_CHECK_MONITOR(mon); + + return qemuMonitorJSONBlockdevMediumInsert(mon, id, nodename); +} + + char * qemuMonitorGetSEVMeasurement(qemuMonitorPtr mon) {
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list