usbip: tools: change to use new error codes in server reply messages
[sfrench/cifs-2.6.git] / tools / usb / usbip / src / usbip_list.c
index d65a9f444174495029e96bc5d81c0fbfd81e52b5..8d4ccf4b948010305bff3c000a16d17eee6ad123 100644 (file)
@@ -62,6 +62,7 @@ static int get_exported_devices(char *host, int sockfd)
        struct usbip_usb_interface uintf;
        unsigned int i;
        int rc, j;
+       int status;
 
        rc = usbip_net_send_op_common(sockfd, OP_REQ_DEVLIST, 0);
        if (rc < 0) {
@@ -69,9 +70,10 @@ static int get_exported_devices(char *host, int sockfd)
                return -1;
        }
 
-       rc = usbip_net_recv_op_common(sockfd, &code);
+       rc = usbip_net_recv_op_common(sockfd, &code, &status);
        if (rc < 0) {
-               dbg("usbip_net_recv_op_common failed");
+               err("Exported Device List Request failed - %s\n",
+                   usbip_op_common_status_string(status));
                return -1;
        }