From b9e2d83b75d078143c7ccac3b3070f420b342315 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 17 Jan 2024 16:31:16 +0100 Subject: [PATCH] vmspawn: include qemu cmdline in debug output It's just so useful for debugging to know what is going to be executed. --- src/vmspawn/vmspawn.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index e2d45d514aa..e6ab63a6cdd 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -647,6 +647,14 @@ static int run_virtual_machine(void) { return log_error_errno(r, "Failed to call getsockname on vsock: %m"); } + if (DEBUG_LOGGING) { + _cleanup_free_ char *joined = quote_command_line(cmdline, SHELL_ESCAPE_EMPTY); + if (!joined) + return log_oom(); + + log_debug("Executing: %s", joined); + } + _cleanup_(sd_event_source_unrefp) sd_event_source *notify_event_source = NULL; _cleanup_(sd_event_unrefp) sd_event *event = NULL; r = sd_event_new(&event); -- 2.47.3