OSDN Git Service

usbip: tools: add more error codes for usbip request/reply messages
authorShuah Khan <shuahkh@osg.samsung.com>
Wed, 7 Mar 2018 20:42:24 +0000 (13:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 17:17:08 +0000 (09:17 -0800)
commitf6bcbf2e24eb10275b6614ccd9cab3e7d93748de
tree4cb8581885359c7503e6c16144e7561c133820d9
parent8fe8f5821c4ebd1c80099ff0d2b197fd17581a2c
usbip: tools: add more error codes for usbip request/reply messages

Currently ST_OK and ST_NA are the only values defined to communicate
status of a request from a client. Add more error codes to clearly
indicate what failed. For example, when client sends request to import
a device that isn't export-able, server can send a specific error code
to the client.

Existing defines are moved to a common header in libsrc to be included
in the libusbip_la-usbip_common.o to be used by all the usbip tools.
Supporting interface to print error strings is added to the common lib.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/usbip/libsrc/usbip_common.c
tools/usb/usbip/libsrc/usbip_common.h
tools/usb/usbip/src/usbip_network.h