[PATCH 2/2] qemu: set swtpm log level parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This wires up the emulator 'debug' parameter to control the
/usr/bin/swtpm 'level' parameter for logging.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/qemu/qemu_tpm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
index bf0c6bcb0d..2f17918cbb 100644
--- a/src/qemu/qemu_tpm.c
+++ b/src/qemu/qemu_tpm.c
@@ -611,7 +611,11 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
                            tpm->data.emulator.storagepath);
 
     virCommandAddArg(cmd, "--log");
-    virCommandAddArgFormat(cmd, "file=%s", tpm->data.emulator.logfile);
+    if (tpm->data.emulator.debug != 0)
+        virCommandAddArgFormat(cmd, "file=%s,level=%u", tpm->data.emulator.logfile,
+                               tpm->data.emulator.debug);
+    else
+        virCommandAddArgFormat(cmd, "file=%s", tpm->data.emulator.logfile);
 
     virCommandAddArg(cmd, "--terminate");
 
-- 
2.45.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux