libxl: fix error message in local_device_attach_cb

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>
This commit is contained in:
Roger Pau Monne authored and Ian Jackson committed 2016-04-06 15:50:45 +01:00
1 parent 73c25e948e
commit f61479c2c3
1 file changed
+1 -4
+1 -4
View 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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.