Skip to content

Conversation

@jluebbe
Copy link
Member

@jluebbe jluebbe commented Oct 8, 2021

Description

As the default udev configuration enables the path_id and usb_id helpers for
many USB-based devices, first check if ID_PATH or ID_SERIAL_SHORT are available
on the device itself. Use the parent USB device only if it's not found.

Checklist

  • Documentation for the feature
  • PR has been tested
  • Man pages have been regenerated

@jluebbe
Copy link
Member Author

jluebbe commented Oct 8, 2021

This PR was inspired by #841.

Emantor
Emantor previously approved these changes Oct 9, 2021
… matches

Point to the builtin usb_id udev helper which generates these properties.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
As the default udev configuration enables the path_id and usb_id helpers for
many USB-based devices, first check if ID_PATH or ID_SERIAL_SHORT are available
on the device itself. Use the parent USB device only if it's not found.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
For ID_SERIAL_SHORT and ID_PATH with @ (parent match), no quote is needed to
mark it as a string. This now matches the output from labgrid-suggest.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #852 (c9bbdd7) into master (b1229ff) will not change coverage.
The diff coverage is 0.0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #852   +/-   ##
======================================
  Coverage    56.9%   56.9%           
======================================
  Files         145     145           
  Lines       10854   10854           
======================================
  Hits         6179    6179           
  Misses       4675    4675           
Impacted Files Coverage Δ
labgrid/resource/udev.py 48.1% <0.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1229ff...c9bbdd7. Read the comment docs.

@Emantor Emantor merged commit dc8392a into labgrid-project:master Oct 13, 2021
@jluebbe jluebbe deleted the suggest branch October 15, 2021 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants