On Thu, Feb 25, 2016 at 08:25:18PM +0100, Roger Pau Monne wrote:
> The fields that are printed might not be set in the case of a failure, which
> generates a segmentation fault.
> 

Right, I can see how this can fail.

In device_addrm_aocomplete we check if aodev is set. But I think that's
a bit overkill for local attach.

> Signed-off-by: Roger Pau Monné <roger....@citrix.com>

Acked-by: Wei Liu <wei.l...@citrix.com>

> ---
> Cc: Ian Jackson <ian.jack...@eu.citrix.com>
> Cc: Ian Campbell <ian.campb...@citrix.com>
> Cc: Wei Liu <wei.l...@citrix.com>
> ---
>  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 d55c699..d5a0a01 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -3144,10 +3144,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)
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to