qemu: support logfile on live attaching chardev

Currently it is simply ignored.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Nikolay Shirokovskiy 2020-12-02 14:44:38 +03:00
parent 106a89fbf7
commit 5e381c8e94

View File

@ -7571,6 +7571,13 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
goto cleanup;
}
if (chr->logfile &&
virJSONValueObjectAdd(data,
"s:logfile", chr->logfile,
"T:logappend", chr->logappend,
NULL) < 0)
goto cleanup;
if (virJSONValueObjectAppendString(backend, "type", backend_type) < 0 ||
virJSONValueObjectAppend(backend, "data", data) < 0)
goto cleanup;