]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: fix error message in device_backend_callback
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 10 Sep 2012 10:13:53 +0000 (11:13 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Mon, 10 Sep 2012 10:13:53 +0000 (11:13 +0100)
device_backend_callback error path always says "unable to disconnect",
but this can also happen during the connection of a device. Fix the
error message using the information in aodev->action.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_device.c

index 8e8410e2144de3563e67f7fc036a68e742f48785..c3283f1d889a0b159cf3e6befa4458d0722fa743 100644 (file)
@@ -854,7 +854,8 @@ static void device_backend_callback(libxl__egc *egc, libxl__ev_devstate *ds,
     }
 
     if (rc) {
-        LOG(ERROR, "unable to disconnect device with path %s",
+        LOG(ERROR, "unable to %s device with path %s",
+                   aodev->action == DEVICE_CONNECT ? "connect" : "disconnect",
                    libxl__device_backend_path(gc, aodev->dev));
         goto out;
     }