]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: fix error message in local_device_attach_cb
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 31 Mar 2016 12:56:42 +0000 (14:56 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 6 Apr 2016 14:50:45 +0000 (15:50 +0100)
The fields that are printed might not be set in the case of a failure, which
generates a segmentation fault.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c

index c884de91bf837fabbe3e0ebc5fdabaf32069c2c1..829badc82049da93f510e31b44a399babace815b 100644 (file)
@@ -3209,10 +3209,7 @@ static void local_device_attach_cb(libxl__egc *egc, libxl__ao_device *aodev)
 
     rc = aodev->rc;
     if (rc) {
-        LOGE(ERROR, "unable to %s %s with id %u",
-                    libxl__device_action_to_string(aodev->action),
-                    libxl__device_kind_to_string(aodev->dev->kind),
-                    aodev->dev->devid);
+        LOGE(ERROR, "unable locally attach device: %s", disk->pdev_path);
         goto out;
     }