[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V1 08/32] savevm: HMP command for cprinfo
From: |
Steve Sistare |
Subject: |
[PATCH V1 08/32] savevm: HMP command for cprinfo |
Date: |
Thu, 30 Jul 2020 08:14:12 -0700 |
Enable HMP access to the cprinfo QMP command.
Usage: cprinfo
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
hmp-commands.hx | 13 +++++++++++++
include/monitor/hmp.h | 1 +
monitor/hmp-cmds.c | 10 ++++++++++
3 files changed, 24 insertions(+)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index cb67150..7517876 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -354,6 +354,19 @@ SRST
ERST
{
+ .name = "cprinfo",
+ .args_type = "",
+ .params = "",
+ .help = "return list of modes supported by cprsave",
+ .cmd = hmp_cprinfo,
+ },
+
+SRST
+``cprinfo`` *tag*
+ Return a space-delimited list of modes supported by cprsave.
+ERST
+
+ {
.name = "cprsave",
.args_type = "file:s,mode:s",
.params = "file 'reboot'",
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h
index 7b8cdfd..919b9a9 100644
--- a/include/monitor/hmp.h
+++ b/include/monitor/hmp.h
@@ -59,6 +59,7 @@ void hmp_balloon(Monitor *mon, const QDict *qdict);
void hmp_loadvm(Monitor *mon, const QDict *qdict);
void hmp_savevm(Monitor *mon, const QDict *qdict);
void hmp_delvm(Monitor *mon, const QDict *qdict);
+void hmp_cprinfo(Monitor *mon, const QDict *qdict);
void hmp_cprsave(Monitor *mon, const QDict *qdict);
void hmp_cprload(Monitor *mon, const QDict *qdict);
void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index ba95737..2f6af07 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1139,6 +1139,16 @@ void hmp_announce_self(Monitor *mon, const QDict *qdict)
qapi_free_AnnounceParameters(params);
}
+void hmp_cprinfo(Monitor *mon, const QDict *qdict)
+{
+ Error *err = NULL;
+ char *res = qmp_cprinfo(&err);
+
+ monitor_printf(mon, "%s\n", res);
+ g_free(res);
+ hmp_handle_error(mon, err);
+}
+
void hmp_cprsave(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
--
1.8.3.1
- [PATCH V1 00/32] Live Update, Steve Sistare, 2020/07/30
- [PATCH V1 07/32] savevm: QMP command for cprinfo, Steve Sistare, 2020/07/30
- [PATCH V1 04/32] savevm: HMP Command for cprsave, Steve Sistare, 2020/07/30
- [PATCH V1 03/32] savevm: QMP command for cprsave, Steve Sistare, 2020/07/30
- [PATCH V1 10/32] kvmclock: restore paused KVM clock, Steve Sistare, 2020/07/30
- [PATCH V1 01/32] savevm: add vmstate handler iterators, Steve Sistare, 2020/07/30
- [PATCH V1 08/32] savevm: HMP command for cprinfo,
Steve Sistare <=
- [PATCH V1 06/32] savevm: HMP Command for cprload, Steve Sistare, 2020/07/30
- [PATCH V1 11/32] cpu: disable ticks when suspended, Steve Sistare, 2020/07/30
- [PATCH V1 12/32] vl: pause option, Steve Sistare, 2020/07/30
- Re: [PATCH V1 12/32] vl: pause option, Alex Bennée, 2020/07/30