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

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

 



Signed-off-by: Chen Fan <chen.fan.fnst@xxxxxxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]