• Shuah Khan's avatar
    usbip: tools: change to use new error codes in server reply messages · ad81b15d
    Shuah Khan authored
    Changed usbip_network, usbip_attach, usbip_list, and usbipd to use
    and propagate the new error codes in server reply messages.
    
    usbip_net_recv_op_common() is changed to take a pointer to status
    return the status returned in the op_common.status to callers.
    
    usbip_attach and usbip_list use the common interface to print error
    messages to indicate why the request failed.
    
    With this change the messages say why a request failed:
    
    - when a client requests a device that is already exported:
    
    usbip attach -r server_name -b 3-10.2
    usbip: error: Attach Request for 3-10.2 failed - Device busy (exported)
    
    - when a client requests a device that isn't exportable,
    
    usbip attach -r server_name -b 3-10.4
    usbip: error: Attach Request for 3-10.4 failed - Device not found
    Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ad81b15d
usbip_list.c 9.49 KB