Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
-{"QMP": {"capabilities": []}}
+{"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": []}}
+{ "execute": "qmp_capabilities" }
+{"return": {}}
{ "execute": "query-version" }
-{"return": {"qemu": "0.11.50", "package": ""}}
+{"return": {"qemu": "0.12.50", "package": ""}}
Contact
-------
The format is:
-{ "QMP": { "capabilities": json-array } }
+{ "QMP": { "version": json-object, "capabilities": json-array } }
Where,
+- The "version" member contains the Server's version information (the format
+ is the same of the 'query-version' command)
- The "capabilities" member specify the availability of features beyond the
baseline specification
3.1 Server greeting
-------------------
-S: {"QMP": {"capabilities": []}}
+S: {"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": []}}
3.2 Simple 'stop' execution
---------------------------
readline_show_prompt(mon->rs);
}
+static QObject *get_qmp_greeting(void)
+{
+ QObject *ver;
+
+ do_info_version(NULL, &ver);
+ return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}}",ver);
+}
+
/**
* monitor_control_event(): Print QMP gretting
*/
json_message_parser_init(&mon->mc->parser, handle_qmp_command);
- data = qobject_from_jsonf("{ 'QMP': { 'capabilities': [] } }");
+ data = get_qmp_greeting();
assert(data != NULL);
monitor_json_emitter(mon, data);