Found some tech debt for INSTCMD handling from v2.8.0-v2.8.2#2860
Merged
jimklimov merged 4 commits intonetworkupstools:masterfrom Mar 25, 2025
Merged
Found some tech debt for INSTCMD handling from v2.8.0-v2.8.2#2860jimklimov merged 4 commits intonetworkupstools:masterfrom
jimklimov merged 4 commits intonetworkupstools:masterfrom
Conversation
…, let it be known to the TRACKING clients [networkupstools#656, networkupstools#2686] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…etworkupstools#2184] Signed-off-by: Jim Klimov <[email protected]>
…hat require a caller-provided argument (no defaults), or return STAT_INSTCMD_CONVERSION_FAILED Signed-off-by: Jim Klimov <[email protected]>
Member
Author
|
CI agent's system problem, could not reproduce: |
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
May 13, 2025
… 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]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
May 13, 2025
… 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]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
May 14, 2025
…D => HU_FLAG_PARAM_REQUIRED and extend to setvar() too [networkupstools#2955, networkupstools#2860]
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.
Some older tech debt found during work on solution for #2708 and planned follow-up to #2850 in particular:
drivers/dstate.c:sock_arg(): if INSTCMD returns STAT_INSTCMD_UNKNOWN, let it be known to the TRACKING clientsserver/upsd.{c,h}: handle TRACKING value for STAT_CONVERSION_FAILEDERR UNKNOWNrather thanERR INVALID-ARGUMENTwhich applies more closely (at least from variants already defined in the NUT networking protocol)drivers/usbhid-ups.c: anticipate NULLhidups_item->dflfor commands; return STAT_INSTCMD_CONVERSION_FAILED if neither caller nor default parameter was availablevalwith drivers that might put aNULLvalue in thatdflfield forHU_TYPE_CMDentries (none seen in-tree so far)