aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmp.c b/qmp.c
index 82298f6cb0..4c819dd8cf 100644
--- a/qmp.c
+++ b/qmp.c
@@ -183,7 +183,13 @@ void qmp_cont(Error **errp)
void qmp_system_wakeup(Error **errp)
{
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+ if (!qemu_wakeup_suspend_enabled()) {
+ error_setg(errp,
+ "wake-up from suspend is not supported by this guest");
+ return;
+ }
+
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER, errp);
}
ObjectPropertyInfoList *qmp_qom_list(const char *path, Error **errp)