diff mbox

[v2,06/35] libxl/libxl_checkpoint_device.c: used LOG*D functions

Message ID 20161117173617.6697-7-cbosdonnat@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Cedric Bosdonnat Nov. 17, 2016, 5:35 p.m. UTC
From: Cedric Bosdonnat <cbosdonnat@suse.com>

Use LOG*D logging functions where possible instead of the LOG* ones.

Signed-off-by: Cédric Bosdonnat <cbosdonnat@suse.com>
---
 tools/libxl/libxl_checkpoint_device.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/tools/libxl/libxl_checkpoint_device.c b/tools/libxl/libxl_checkpoint_device.c
index 0a16dbb..01e74b5 100644
--- a/tools/libxl/libxl_checkpoint_device.c
+++ b/tools/libxl/libxl_checkpoint_device.c
@@ -132,7 +132,7 @@  static void device_setup_iterate(libxl__egc *egc, libxl__ao_device *aodev)
         if (!dev->ops) {
             libxl_device_nic * nic = NULL;
             libxl_device_disk * disk = NULL;
-            uint32_t domid;
+            uint32_t domid = INVALID_DOMID;
             int devid;
             if (dev->kind == LIBXL__DEVICE_KIND_VIF) {
                 nic = (libxl_device_nic *)dev->backend_dev;
@@ -143,15 +143,15 @@  static void device_setup_iterate(libxl__egc *egc, libxl__ao_device *aodev)
                 domid = disk->backend_domid;
                 devid = libxl__device_disk_dev_number(disk->vdev, NULL, NULL);
             } else {
-                LOG(ERROR,"device kind not handled by checkpoint: %s",
-                    libxl__device_kind_to_string(dev->kind));
+                LOGD(ERROR, domid, "device kind not handled by checkpoint: %s",
+                     libxl__device_kind_to_string(dev->kind));
                 aodev->rc = ERROR_FAIL;
                 goto out;
             }
-            LOG(ERROR,"device not handled by checkpoint"
-                " (device=%s:%"PRId32"/%"PRId32")",
-                libxl__device_kind_to_string(dev->kind),
-                domid, devid);
+            LOGD(ERROR, domid, "device not handled by checkpoint"
+                 " (device=%s:%"PRId32"/%"PRId32")",
+                 libxl__device_kind_to_string(dev->kind),
+                 domid, devid);
             aodev->rc = ERROR_CHECKPOINT_DEVICE_NOT_SUPPORTED;
             goto out;
         }