Fix usbhid-ups instant commands that could work without non-trivial args before NUT v2.8.3#2955
Merged
jimklimov merged 5 commits intonetworkupstools:masterfrom May 16, 2025
Merged
Conversation
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
… introduce HU_FLAG_CMD_PARAM_REQUIRED and a HU_TYPE_CMD_PARAM_REQUIRED shortcut for setting in the mapping tables Complete the feature started in commit 7991e45 which became a regression of NUT v2.8.3 [networkupstools#2860]. Signed-off-by: Jim Klimov <[email protected]>
…D => HU_FLAG_PARAM_REQUIRED and extend to setvar() too [networkupstools#2955, networkupstools#2860]
This was referenced May 15, 2025
Merged
Member
Author
|
Checked on the mailing list, allegedly this fix solves the problem. Distributions that insist on shipping a minimally changed NUT v2.8.3 as their baseline with just small bug fix patches can probably instead apply a |
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.
As raised in https://alioth-lists.debian.net/pipermail/nut-upsuser/2025-May/013964.html mailing list discussion, NUT v2.8.3 refused to command an UPS to shut down, while v2.8.2 was successful (to an extent - a command was at least sent, but the UPS was just beeping). This is a regression due to PR #2860, apparently.
This PR restores use of
0value being passed as instcmd argument if none was given (the earlier use of NULL could segfault on some systems; now it falls back to an explicit"0"string).