From f8e88be1d156c5e8000a85cc47ea5ab9007bdaf8 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 5 Apr 2026 19:36:14 +0200 Subject: [PATCH] swtpm-util: Silence noise from swtpm_setup There's no way to configure the log level for swtpm_setup, so pipe it's logfile (which defaults to stderr) to /dev/null unless debug logging is enabled. --- src/shared/swtpm-util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/swtpm-util.c b/src/shared/swtpm-util.c index 61413e7226..156a5422df 100644 --- a/src/shared/swtpm-util.c +++ b/src/shared/swtpm-util.c @@ -216,6 +216,9 @@ int manufacture_swtpm(const char *state_dir, const char *secret) { if (best_profile && strv_extendf(&args, "--profile-name=%s", best_profile) < 0) return log_oom(); + if (!DEBUG_LOGGING && strv_extend_many(&args, "--logfile", "/dev/null") < 0) + return log_oom(); + if (DEBUG_LOGGING) { _cleanup_free_ char *cmdline = quote_command_line(args, SHELL_ESCAPE_EMPTY); log_debug("About to spawn: %s", strnull(cmdline));