qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] QMP: Add a warning to the greeting message


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 2/2] QMP: Add a warning to the greeting message
Date: Thu, 22 Jul 2010 11:47:01 -0300

This commit add the following new key to QMP's greeting message:

  "warning": "QMP is unstable, it will change soon!"

The goal is to go beyond document warnings with regard to QMP's
current state.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 QMP/README |    2 +-
 monitor.c  |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/QMP/README b/QMP/README
index 8618c6f..cf158d2 100644
--- a/QMP/README
+++ b/QMP/README
@@ -61,7 +61,7 @@ $ telnet localhost 4444
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
-{"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": []}}
+{"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": [], 
"warning": "QMP is unstable, it will change soon!"}}
 { "execute": "qmp_capabilities" }
 {"return": {}}
 { "execute": "query-version" }
diff --git a/monitor.c b/monitor.c
index 45fd482..c259b28 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4384,7 +4384,8 @@ static QObject *get_qmp_greeting(void)
     QObject *ver;
 
     do_info_version(NULL, &ver);
-    return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': 
[]}}",ver);
+    return qobject_from_jsonf("{ 'QMP': { 'version': %p, 'capabilities': [], "
+            "'warning': 'QMP is unstable, it will change soon!' } }", ver);
 }
 
 /**
-- 
1.7.2.rc3.43.g24e7a




reply via email to

[Prev in Thread] Current Thread [Next in Thread]