Skip to content

Conversation

@carlnorum
Copy link

If a device has fewer than 6 lines in its system profiler description, it will get merged with the following device in the egrep output. This patch changes the device splitting logic into an awk script that is more context aware about the format of the system profiler output.

If a device has fewer than 6 lines in its system profiler description,
it will get merged with the following device in the egrep output. This
patch changes the device splitting logic into an awk script that is
more context aware about the format of the system profiler output.
@carlnorum
Copy link
Author

An example of the broken egrep output from my machine today:

--
        TS4 USB2.0 Hub:

          Product ID: 0x5802
          Vendor ID: 0x2188  (CalDigit)
          Version: 1.01
          Speed: Up to 480 Mb/s
          Manufacturer: CalDigit, Inc.
          Location ID: 0x02100000 / 1
          Current Available (mA): 500
--
            USB2.1 Hub:

              Product ID: 0x5409
              Vendor ID: 0x0bda  (Realtek Semiconductor Corp.)
              Version: 1.41
              Speed: Up to 480 Mb/s
              Manufacturer: Generic
              Location ID: 0x02150000 / 3
              Current Available (mA): 500
--
                BillBoard Device:

                  Product ID: 0x5418
                  Vendor ID: 0x0bda  (Realtek Semiconductor Corp.)
                  Version: 1.01
                  Manufacturer: Realtek
                  Location ID: 0x02155000

                C3422WE:

                  Product ID: 0xc00f
                  Vendor ID: 0x413c  (Dell Inc.)
                  Version: 0.00
                  Serial Number: CMFND1CIARFL
                  Speed: Up to 12 Mb/s
                  Manufacturer: Dell
                  Location ID: 0x02153000 / 7
--
                HID Device:

                  Product ID: 0x1101
                  Vendor ID: 0x0bda  (Realtek Semiconductor Corp.)
                  Version: 1.01
                  Speed: Up to 480 Mb/s
                  Manufacturer: Realtek
                  Location ID: 0x02156000 / 6
                  Current Available (mA): 500
--

This patch fixes that short "billboard" device to work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants