-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Enhance USB device and subdriver matching in usbhid-ups
to be on par with nutdrv_qx
#2058
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With the requirement of IDs added, it behaves like this:
Subdriver confirmed matched (exists), but then aborts due to lack of both VID and PID (only one is given) before even checking them. |
jimklimov
added
nut-scanner
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
portability
We want NUT to build and run everywhere possible
labels
Sep 18, 2023
… adapt configure.ac and */Makefile.am accordingly Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…-common.{c,h} [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…link and run-time deps pulled), not libcommon.la Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…subdriver" matching option; update docs about it [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…f regex "somename.*" [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…e of found USB HID subdriver [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…commend) vendorid/productid [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…arnings that we can not really address [networkupstools#2055, networkupstools#823] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
… numbers Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…(non-NULL) report, let all complaints be known Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…ifferent devices" Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Steamline use of LIBREGEX_CFLAGS via AM_CFLAGS, same as others. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…rary name, when checking for -lregex Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…s about subdriver settings [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ver" setting values in command-line usage request (--help) [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…" setting values in command-line usage request (--help) [networkupstools#1369] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
issue-1369
branch
from
September 18, 2023 20:12
cc0e41a
to
e8e7dc5
Compare
jimklimov
added
documentation
Qx protocol driver
Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others
labels
Sep 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
documentation
enhancement
nut-scanner
portability
We want NUT to build and run everywhere possible
Qx protocol driver
Driver based on Megatec Q<number> such as new nutdrv_qx, or obsoleted blazer and some others
USB
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #1369
By side effect, moves detection of libregex build parameters (if any are needed) into a separate m4 script, and creates automake and C macros to shield about their presence. Generic regex helper methods (not intimate to USB) moved to common.c/h. Also, found that
clients/*
were built by default withlibcommon.la
(notlibcommonclient.la
) and pulled extra dependencies like-lsystemd
that (most of) the clients should not care about - also addressed.Example testing outcome: this change allows poking an Eaton device with a "not-its" (Tripplite) subdriver, even getting a bit of info as seen below.
Unlike
nutdrv_qx
, for the iteration shown below I did not constrain this feature to require at least a specifiedvendorid
andproductid
in configuration, but makes sense to add it. As seen in the "screenshot", the driver opened the first device it had FS-level permission to access.Similarly by substring regex which is a more likely use-case:
Example of standard matching options still being honoured (using locally-absent
vendorid
):Also fixes some issues with
nut-scanner
reporting of suspect serial numbers, and quiesces some warnings for new clang versions (which we can't do much about in practice => CC #823 "fightwarn" effort).