VirtualBox

Opened 3 years ago

Closed 2 years ago

#20721 closed defect (fixed)

VBoxCreateUSBNode.sh string comparison using -eq => Fixed in SVN

Reported by: Nik Soggia Owned by:
Component: host support Version: VirtualBox 6.1.30
Keywords: usb proxy udev helper device class bash linux Cc:
Guest type: all Host type: Linux

Description

Udev $attr{bDeviceClass} is a string representing a 2-digit hexadecimal value.
To check the usb class VBoxCreateUSBNode.sh should therefore use "=" instead of "-eq".

As an example, this bluetooth adapter belongs to the 0xff device class:

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         1
  bDeviceProtocol         1
  bMaxPacketSize0        64
  idVendor           0x0a5c Broadcom Corp.
  idProduct          0x21e8 BCM20702A0 Bluetooth 4.0
  bcdDevice            1.12
  iManufacturer           1 Broadcom Corp
  iProduct                2 BCM20702A0
  iSerial                 3 000000000000
  bNumConfigurations      1

Cheers

Attachments (1)

VBoxCreateUSBNode.patch (478 bytes ) - added by Nik Soggia 3 years ago.
the right way to compare strings

Download all attachments as: .zip

Change History (3)

by Nik Soggia, 3 years ago

Attachment: VBoxCreateUSBNode.patch added

the right way to compare strings

comment:1 by Valery Ushakov, 3 years ago

Summary: VBoxCreateUSBNode.sh string comparison using -eqVBoxCreateUSBNode.sh string comparison using -eq => Fixed in SVN

Fixed in SVN. Thanks.

comment:2 by aeichner, 2 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette