Skip to content

Port and use a variant of nut_usb_get_string() for nut-scanner#2626

Merged
jimklimov merged 4 commits intonetworkupstools:masterfrom
jimklimov:issue-2615
Sep 11, 2024
Merged

Port and use a variant of nut_usb_get_string() for nut-scanner#2626
jimklimov merged 4 commits intonetworkupstools:masterfrom
jimklimov:issue-2615

Conversation

@jimklimov
Copy link
Copy Markdown
Member

@jimklimov jimklimov commented Sep 11, 2024

Partially addresses #2615 (the part for nut-scanner scope), follows-up from PR #2604.

Beside porting the method proposed by @tormodvolden in #2604 for usb-common.c, there were some other methods used by it that needed porting from libusb headers (inline, not dynamic symbols).

Checked with libusb-0.1 and libusb-1.0 builds on a physical machine, that the resulting nut-scanner -U still finds an Eaton USB UPS (although with model not impacted by the issue from #1925 / #2604).

Also found and fixed a problem with stashing of SOPATH and SONAME for libraries seen during build (so libnutscan would search for those exact filenames first), as this did not play well with the few "GNU ld script" files instead of binary dynamic libraries, as found on the tested system. Probably can be seen as a fallout of PR #2504 et al for issue #2431.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… to a real library

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added enhancement packaging nut-scanner USB portability We want NUT to build and run everywhere possible Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) labels Sep 11, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Sep 11, 2024
@jimklimov jimklimov merged commit 7cb95f4 into networkupstools:master Sep 11, 2024
@jimklimov jimklimov deleted the issue-2615 branch September 11, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Incorrect or missing readings On some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.) nut-scanner packaging portability We want NUT to build and run everywhere possible USB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant