Skip to contentSkip to conversation

libxl: fix error message in device_backend_callback

PATCH In review Roger Pau Monne 2 participants 2 messages Sep 4, 2012 – Sep 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: fix error message in device_backend_callback

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.

---
 tools/libxl/libxl_device.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
tools/libxl/libxl_device.c +2 -1
index 8e8410e..c3283f1 100644
@@ -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;
     }
Signature · 1 line
1.7.7.5 (Apple Git-26)
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Roger Pau Monne

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.

and applied.

Jan, can we consider this one for 4.2.1 please.

Ian.

Quoted 18 lines
---
 tools/libxl/libxl_device.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
tools/libxl/libxl_device.c +2 -1
index 8e8410e..c3283f1 100644
@@ -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;
     }