-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix serial number reporting on Windows for some devices #131
Conversation
The existing program incorrectly decoded the first character as being the serial port. If there is an `&` in the serial number, then we want the 2nd field. Signed-off-by: Sean Cross <[email protected]>
Signed-off-by: Sean Cross <[email protected]>
Signed-off-by: Sean Cross <[email protected]>
Additionally, several clippy lints were fixed as a result of looking over this code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
Could you add a short entry to the changelog as well?
I'm actually not sure about the validity of this approach. For example, on my system, the serial number shows up as It's possible to get the serial number by trimming Is there still interest in this patch if it returns "a" serial number rather than "the" serial number? |
I see. I am not sure myself. Maybe somebody else can weigh in? |
Signed-off-by: Sean Cross <[email protected]>
Sounds good. I've updated CHANGELOG.md as requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
Some devices have their serial numbers misreported. For example, the BMP device
USB\VID_1D50&PID_6018&MI_02\6&A694CA9&0&0000
gets a reported serial number of6
rather thanA694CA9
.Fix this and update the testcase.