X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=hmp.c;h=32ee285a1e2b1cac31aada45c994418e3229a857;hb=485e741cd15655b4032b07b8a912aa5c7a4f2028;hp=b4a6422e7a3093712ee5969dfc83a94df78f223b;hpb=d985bd4d55555a06c4239eadba4e367880e938ba;p=qemu.git diff --git a/hmp.c b/hmp.c index b4a6422e7..32ee285a1 100644 --- a/hmp.c +++ b/hmp.c @@ -366,8 +366,6 @@ void hmp_info_block(Monitor *mon, const QDict *qdict) info->value->inserted->iops_rd_max, info->value->inserted->iops_wr_max, info->value->inserted->iops_size); - } else { - monitor_printf(mon, " [not inserted]"); } if (verbose) { @@ -978,6 +976,28 @@ void hmp_snapshot_blkdev(Monitor *mon, const QDict *qdict) hmp_handle_error(mon, &errp); } +void hmp_snapshot_blkdev_internal(Monitor *mon, const QDict *qdict) +{ + const char *device = qdict_get_str(qdict, "device"); + const char *name = qdict_get_str(qdict, "name"); + Error *errp = NULL; + + qmp_blockdev_snapshot_internal_sync(device, name, &errp); + hmp_handle_error(mon, &errp); +} + +void hmp_snapshot_delete_blkdev_internal(Monitor *mon, const QDict *qdict) +{ + const char *device = qdict_get_str(qdict, "device"); + const char *name = qdict_get_str(qdict, "name"); + const char *id = qdict_get_try_str(qdict, "id"); + Error *errp = NULL; + + qmp_blockdev_snapshot_delete_internal_sync(device, !!id, id, + true, name, &errp); + hmp_handle_error(mon, &errp); +} + void hmp_migrate_cancel(Monitor *mon, const QDict *qdict) { qmp_migrate_cancel(NULL); @@ -1141,7 +1161,7 @@ void hmp_block_stream(Monitor *mon, const QDict *qdict) qmp_block_stream(device, base != NULL, base, qdict_haskey(qdict, "speed"), speed, - BLOCKDEV_ON_ERROR_REPORT, true, &error); + true, BLOCKDEV_ON_ERROR_REPORT, &error); hmp_handle_error(mon, &error); }