diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2018-03-07 15:42:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-09 12:17:08 -0500 |
commit | f6bcbf2e24eb10275b6614ccd9cab3e7d93748de (patch) | |
tree | 4cb8581885359c7503e6c16144e7561c133820d9 /tools/usb/usbip/src | |
parent | 8fe8f5821c4ebd1c80099ff0d2b197fd17581a2c (diff) |
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>
Diffstat (limited to 'tools/usb/usbip/src')
-rw-r--r-- | tools/usb/usbip/src/usbip_network.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/usb/usbip/src/usbip_network.h b/tools/usb/usbip/src/usbip_network.h index 7032687621d3..b6a2f9be888c 100644 --- a/tools/usb/usbip/src/usbip_network.h +++ b/tools/usb/usbip/src/usbip_network.h | |||
@@ -27,9 +27,7 @@ struct op_common { | |||
27 | #define OP_REPLY (0x00 << 8) | 27 | #define OP_REPLY (0x00 << 8) |
28 | uint16_t code; | 28 | uint16_t code; |
29 | 29 | ||
30 | /* add more error code */ | 30 | /* status codes defined in usbip_common.h */ |
31 | #define ST_OK 0x00 | ||
32 | #define ST_NA 0x01 | ||
33 | uint32_t status; /* op_code status (for reply) */ | 31 | uint32_t status; /* op_code status (for reply) */ |
34 | 32 | ||
35 | } __attribute__((packed)); | 33 | } __attribute__((packed)); |