From f61479c2c35af5894fd4b3da91f0bb4da996e1ab Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 31 Mar 2016 14:56:42 +0200 Subject: [PATCH] libxl: fix error message in local_device_attach_cb MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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é Acked-by: Wei Liu --- tools/libxl/libxl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index c884de91bf..829badc820 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -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; } -- 2.30.2