diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index bc116e4e2d9df55280df5cca20fdb0c3d9c3b6f8..45cd51e43f6a3087a2b9dd03265dbc2f518a6faa 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3203,23 +3203,6 @@ qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name) } -/* Use the snapshot_blkdev command to convert the existing file for - * device into a read-only backing file of a new qcow2 image located - * at file. */ -int -qemuMonitorDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions, - const char *device, const char *file, - const char *format, bool reuse) -{ - VIR_DEBUG("actions=%p, device=%s, file=%s, format=%s, reuse=%d", - actions, device, file, format, reuse); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONDiskSnapshot(mon, actions, device, file, format, reuse); -} - - /* Start a drive-mirror block job. bandwidth is in bytes/sec. */ int qemuMonitorDriveMirror(qemuMonitorPtr mon, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 81474a04f6d352c587e56b0548250300774967c0..b8e3ca2ce1e4b724e140c01bc0f5e2cad5fdb83b 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -839,12 +839,6 @@ int qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name); int qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name); int qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name); -int qemuMonitorDiskSnapshot(qemuMonitorPtr mon, - virJSONValuePtr actions, - const char *device, - const char *file, - const char *format, - bool reuse); int qemuMonitorTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions) ATTRIBUTE_NONNULL(2); int qemuMonitorDriveMirror(qemuMonitorPtr mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 95ad53fc89a4e10803232ec130f235eb7cdaaeaf..2906f9bd2653aa4a6aba4f9de53fe3bac4b7acd1 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4112,43 +4112,6 @@ int qemuMonitorJSONDelObject(qemuMonitorPtr mon, } -int -qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions, - const char *device, const char *file, - const char *format, bool reuse) -{ - int ret = -1; - virJSONValuePtr cmd; - virJSONValuePtr reply = NULL; - - cmd = qemuMonitorJSONMakeCommandRaw(actions != NULL, - "blockdev-snapshot-sync", - "s:device", device, - "s:snapshot-file", file, - "s:format", format, - "S:mode", reuse ? "existing" : NULL, - NULL); - if (!cmd) - return -1; - - if (actions) { - if (virJSONValueArrayAppend(actions, cmd) == 0) { - ret = 0; - cmd = NULL; - } - } else { - if ((ret = qemuMonitorJSONCommand(mon, cmd, &reply)) < 0) - goto cleanup; - - ret = qemuMonitorJSONCheckError(cmd, reply); - } - - cleanup: - virJSONValueFree(cmd); - virJSONValueFree(reply); - return ret; -} - /* speed is in bytes/sec */ int qemuMonitorJSONDriveMirror(qemuMonitorPtr mon, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index eb77ea45e05ec50e1d8c7adc6b4972d6e8a0d862..0458d81c0de560cfb85c7b48ddc1067370622db6 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -242,14 +242,6 @@ int qemuMonitorJSONAddObject(qemuMonitorPtr mon, int qemuMonitorJSONDelObject(qemuMonitorPtr mon, const char *objalias); -int qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, - virJSONValuePtr actions, - const char *device, - const char *file, - const char *format, - bool reuse) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) - ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5); int qemuMonitorJSONTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,