aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usbip.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-08-08 14:51:38 +0200
committerAnders Broman <a.broman58@gmail.com>2017-06-12 06:34:16 +0000
commit6b09377285919333910810bcb0480f9413c5f452 (patch)
tree3b086ec093042db1b1de0a6918dd065c3683c027 /epan/dissectors/packet-usbip.c
parente815bbb2e6946e210cd15b1d9c2d280332352c4e (diff)
Extract errno value_strings from usb code
The convention of returning negative errno codes from the Linux kernel is not just limited to usb/usbip, it is also needed by netlink. Now netlink error codes are properly dissected. Also add ERFKILL and EHWPOISON (since 2009 and 2011) and change ESTALE and ENOSYS to match the current description as of Linux 4.7. Fixed header paths in comments too. Used this command to generate the table (with fixups for gaps): cpp -dM -CC include/uapi/asm-generic/errno.h | perl -ne '/^#define (E[A-Z0-9]+) ([0-9]+) \/\* (.+) \*\// && printf " { -%-4s \"%s (-%s)\" },\n", "$2,", $3, $1' | sort -k2 Change-Id: I16fa41a42bd4201a8383ea8e70a0aa8a597b311d Reviewed-on: https://code.wireshark.org/review/16952 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-usbip.c')
-rw-r--r--epan/dissectors/packet-usbip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-usbip.c b/epan/dissectors/packet-usbip.c
index 38e0a443ee..e6f632cbae 100644
--- a/epan/dissectors/packet-usbip.c
+++ b/epan/dissectors/packet-usbip.c
@@ -164,6 +164,7 @@ static value_string_ext usbip_urb_vals_ext = VALUE_STRING_EXT_INIT(usbip_urb_val
extern value_string_ext ext_usb_vendors_vals;
extern value_string_ext ext_usb_products_vals;
+extern value_string_ext linux_negative_errno_vals_ext;
static const value_string usb_endpoint_direction_vals[] = {
{USBIP_DIR_OUT, "OUT" },
@@ -853,7 +854,7 @@ proto_register_usbip(void)
{&hf_usbip_status,
{"Status", "usbip.status",
- FT_INT32, BASE_DEC | BASE_EXT_STRING, &usb_urb_status_vals_ext, 0,
+ FT_INT32, BASE_DEC | BASE_EXT_STRING, &linux_negative_errno_vals_ext, 0,
"USBIP Status", HFILL}},
{&hf_usbip_number_devices,