summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 14:36:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 14:36:24 +0200
commitf7cb6bcf153df115fc43cfba4ececf29eb29ade7 (patch)
tree09952d2d5abf9a6153e013e5a945c8268c402fa7
parent77b93c9afaba7edc950861b54259a94733b3274c (diff)
downloadusbutils-f7cb6bcf153df115fc43cfba4ececf29eb29ade7.tar.gz
lsusb: fix up Midi Device specification devices
The DescriptorSubtype should be checking for 0x02, not 0x01, in order to display (GENERAL) or (Invalid) as per the USB specification for USB MIDI devices. Reported-by: symdeb Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--lsusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lsusb.c b/lsusb.c
index 58102c2..032ed1b 100644
--- a/lsusb.c
+++ b/lsusb.c
@@ -1495,7 +1495,7 @@ static void dump_midistreaming_endpoint(const unsigned char *buf)
" bDescriptorType %5u\n"
" bDescriptorSubtype %5u (%s)\n"
" bNumEmbMIDIJack %5u\n",
- buf[0], buf[1], buf[2], buf[2] == 1 ? "GENERAL" : "Invalid", buf[3]);
+ buf[0], buf[1], buf[2], buf[2] == 2 ? "GENERAL" : "Invalid", buf[3]);
for (j = 0; j < buf[3]; j++)
printf(" baAssocJackID(%2u) %5u\n", j, buf[4+j]);
dump_junk(buf, " ", 4+buf[3]);