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

[libvirt] [RFC 3/3] qemu-agent: add notify for qemu-ga boot



Signed-off-by: Chen Fan <chen fan fnst cn fujitsu com>
---
 qga/main.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/qga/main.c b/qga/main.c
index 9939a2b..f011ce0 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1170,6 +1170,19 @@ int main(int argc, char **argv)
         g_critical("failed to initialize guest agent channel");
         goto out_bad;
     }
+
+    /* send a notification to path */
+    if (ga_state->channel) {
+        QDict *qdict = qdict_new();
+        int ret;
+
+        qdict_put_obj(qdict, "status", QOBJECT(qstring_from_str("connected")));
+        ret = send_response(s, QOBJECT(qdict));
+        if (ret < 0) {
+            g_warning("error sending connected status");
+        }
+    }
+
 #ifndef _WIN32
     g_main_loop_run(ga_state->main_loop);
 #else
-- 
1.9.3


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