From ba05d72a31f243be1d84b5b3e1bf88c12fc9c7f3 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Fri, 26 Feb 2016 10:54:32 +0100 Subject: [PATCH 7/8] libxl: fix error message in local_device_attach_cb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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é --- Cc: Ian Jackson Cc: Ian Campbell Cc: 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 cbe1608..f8abe73 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -3132,10 +3132,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.5.4 (Apple Git-61)