[PATCH 06/11] qemuBuildCommandLine: Sanitize debug logging

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

 



Improve the debug log inside 'qemuBuildCommandLine' to include the name
from the definition and remove useless data such as the pointer to the
qemuDriver object or qemuCaps.

Additionally remove the non-specific debug statements:

  VIR_DEBUG("Building emulator command line");

from the two callers of qemuBuildCommandLine.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 6 ++----
 src/qemu/qemu_process.c | 2 --
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3e9db271b1..35ed8ac0ed 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10431,10 +10431,8 @@ qemuBuildCommandLine(virQEMUDriver *driver,
     virDomainDef *def = vm->def;
     virQEMUCaps *qemuCaps = priv->qemuCaps;

-    VIR_DEBUG("driver=%p def=%p mon=%p "
-              "qemuCaps=%p migrateURI=%s snapshot=%p vmop=%d flags=0x%x",
-              driver, def, priv->monConfig,
-              qemuCaps, migrateURI, snapshot, vmop, flags);
+    VIR_DEBUG("Building qemu commandline for def=%s(%p) migrateURI=%s snapshot=%p vmop=%d flags=0x%x",
+              def->name, def, migrateURI, snapshot, vmop, flags);

     if (qemuBuildCommandLineValidate(driver, def) < 0)
         return NULL;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 38079ce159..1098c3bf93 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7445,7 +7445,6 @@ qemuProcessLaunch(virConnectPtr conn,
     if (qemuExtDevicesStart(driver, vm, incoming != NULL) < 0)
         goto cleanup;

-    VIR_DEBUG("Building emulator command line");
     if (!(cmd = qemuBuildCommandLine(driver,
                                      vm,
                                      incoming ? "defer" : NULL,
@@ -7953,7 +7952,6 @@ qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver,
                                  bool enableFips,
                                  unsigned int flags)
 {
-    VIR_DEBUG("Building emulator command line");
     return qemuBuildCommandLine(driver,
                                 vm,
                                 migrateURI,
-- 
2.35.3




[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