Allow mapping functions to return EINVAL for setvar/instcmd to abort consistently#3017
Merged
jimklimov merged 9 commits intonetworkupstools:masterfrom Jul 17, 2025
Merged
Conversation
…ally for common RESULT [networkupstools#2957] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…AT_INSTCMD_* Be pedantically correct about these, even if they map to same numbers for logical names at the moment. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…licable; use upslog_*_RESULT() in callers su_setvar()/su_instcmd() for maintainability Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…t EINVAL for unsupported arguments, and bail out [networkupstools#3017] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Jul 14, 2025
…ort EINVAL for unsupported arguments, and bail out [networkupstools#3017] Made for progresing on PR networkupstools#2956 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Jul 14, 2025
…ractical [networkupstools#3017] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Jul 14, 2025
…qx_process() methods to report EINVAL for unsupported arguments, and bail out [networkupstools#3017] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ort EINVAL for unsupported arguments, and bail out [networkupstools#3017] Made for progresing on PR networkupstools#2956 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ractical [networkupstools#3017] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…qx_process() methods to report EINVAL for unsupported arguments, and bail out [networkupstools#3017] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to masterwishx/nut
that referenced
this pull request
Jul 14, 2025
…ort EINVAL for unsupported arguments, and bail out [networkupstools#3017] Made for progresing on PR networkupstools#2956 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
❌ Build nut 2.8.3.3353-master failed (commit 904fe55c55 by @jimklimov) |
jimklimov
added a commit
to masterwishx/nut
that referenced
this pull request
Jul 14, 2025
…ls#2956] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ls#2956] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to masterwishx/nut
that referenced
this pull request
Jul 14, 2025
…ls#2956] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etworkupstools#3017] Avoid error claimed by clang-20 et al: conditional expression between different enumeration types ('enum (unnamed at ./upshandler.h:25:1)' and 'enum (unnamed at ./upshandler.h:34:1)') [-Werror,-Wanon-enum-enum-conversion] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note that
errno=EINVALmeans unsupported parameter value for us here.Inspired by discussion and fixes for PR #2956; follows up from PR #2957.
Updates
usbhid-ups,snmp-upsand to an extentnutdrv_qxto have similar functionality with their mappings handling.