summaryrefslogtreecommitdiff
path: root/usbredirhost
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-07-28 11:40:47 +0200
committerHans de Goede <hdegoede@redhat.com>2012-07-28 11:40:47 +0200
commitf8ebcfa7a616983c7fb961513011802039c80e52 (patch)
treeee8fd7287cbb2df35742a7add906144bb8c133f1 /usbredirhost
parent8db9136a14b78db713a564647e6e676e5fcb8a9b (diff)
usbredirhost: Make the error message for busy devices more userfriendly
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'usbredirhost')
-rw-r--r--usbredirhost/usbredirhost.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usbredirhost/usbredirhost.c b/usbredirhost/usbredirhost.c
index 2415c26..3359de4 100644
--- a/usbredirhost/usbredirhost.c
+++ b/usbredirhost/usbredirhost.c
@@ -487,8 +487,11 @@ static int usbredirhost_claim(struct usbredirhost *host, int initial_claim)
r = libusb_detach_kernel_driver(host->handle, n);
if (r < 0 && r != LIBUSB_ERROR_NOT_FOUND
&& r != LIBUSB_ERROR_NOT_SUPPORTED) {
- ERROR("could not detach driver from interface %d (configuration %d): %d",
- n, host->config->bConfigurationValue, r);
+ if (r == LIBUSB_ERROR_BUSY)
+ ERROR("Device is in use by another application");
+ else
+ ERROR("could not detach driver from interface %d (configuration %d): %d",
+ n, host->config->bConfigurationValue, r);
return libusb_status_or_error_to_redir_status(host, r);
}