.args_type = "",
.params = "",
.help = "reset the system",
- .user_print = monitor_user_noop,
- .mhandler.cmd_new = do_system_reset,
+ .mhandler.cmd = hmp_system_reset,
},
STEXI
{
qmp_stop(NULL);
}
+
+void hmp_system_reset(Monitor *mon, const QDict *qdict)
+{
+ qmp_system_reset(NULL);
+}
void hmp_info_chardev(Monitor *mon);
void hmp_quit(Monitor *mon, const QDict *qdict);
void hmp_stop(Monitor *mon, const QDict *qdict);
+void hmp_system_reset(Monitor *mon, const QDict *qdict);
#endif
}
}
-/**
- * do_system_reset(): Issue a machine reset
- */
-static int do_system_reset(Monitor *mon, const QDict *qdict,
- QObject **ret_data)
-{
- qemu_system_reset_request();
- return 0;
-}
-
/**
* do_system_powerdown(): Issue a machine powerdown
*/
# state
##
{ 'command': 'stop' }
+
+##
+# @system_reset:
+#
+# Performs a hard reset of a guest.
+#
+# Since: 0.14.0
+##
+{ 'command': 'system_reset' }
{
.name = "system_reset",
.args_type = "",
- .params = "",
- .help = "reset the system",
- .user_print = monitor_user_noop,
- .mhandler.cmd_new = do_system_reset,
+ .mhandler.cmd_new = qmp_marshal_input_system_reset,
},
SQMP
vm_stop(RUN_STATE_PAUSED);
}
+void qmp_system_reset(Error **errp)
+{
+ qemu_system_reset_request();
+}