
On Thu, Feb 10, 2022 at 18:46:30 +0100, Ján Tomko wrote:
On a Wednesday in 2022, Peter Krempa wrote:
FD passing and TLS is normally setup via private data for the chardev source. The monitor implementation didn't support it.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/qemu/qemu_monitor_json.c | 71 +++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 17 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index e5425daf05..aac0ace7ff 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -6527,6 +6527,23 @@ qemuMonitorJSONBuildUnixSocketAddress(const char *path) return g_steal_pointer(&addr); }
+ +static virJSONValue * +qemuMonitorJSONBuildiFDSocketAddress(const char *fdname)
What does the 'i' stand for?
For 'insert' mode in vim, which I managed to fat-finger into the function name somehow :D, obviously cut&paste engineering was used from that point on :)
+{ + g_autoptr(virJSONValue) addr = NULL; + g_autoptr(virJSONValue) data = NULL; + + if (virJSONValueObjectAdd(&data, "s:str", fdname, NULL) < 0) + return NULL; + + if (virJSONValueObjectAdd(&addr, + "s:type", "fd", + "a:data", &data, NULL) < 0)
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Jano