[PATCH 3/3] qemu: support logfile on live attaching chardev

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Wed Dec 2 11:55:09 UTC 2020


Currently it is simply ignored.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy at virtuozzo.com>
---
 src/qemu/qemu_monitor_json.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index df95a4a..6e96232 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -7610,6 +7610,15 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
         goto cleanup;
     }
 
+    if (chr->logfile) {
+        if (virJSONValueObjectAppendString(data, "logfile",
+                                           chr->logfile) < 0)
+            goto cleanup;
+        if (virJSONValueObjectAppendBooleanTristate(data, "logappend",
+                                                    chr->logappend) < 0)
+            goto cleanup;
+    }
+
     if (virJSONValueObjectAppendString(backend, "type", backend_type) < 0 ||
         virJSONValueObjectAppend(backend, "data", data) < 0)
         goto cleanup;
-- 
1.8.3.1




More information about the libvir-list mailing list