DMF: define a common dmfstdlib with conversion methods that can be used by "static" and DMF builds alike - #3615
Open
jimklimov wants to merge 9 commits into
Open
Conversation
Parts not done (flagging as follow-up, not silently skipped): - `dmfcore_parse_finish_cb`-level "reject whole file" behavior for the strict policy isn't wired yet - today the policy only changes logging verbosity at the existing call sites, not the control flow. - DMF XML keyword for referencing `dmf_stdlib` methods by name (e.g. `conversion="scale_format"`) isn't parsed by `dmfsnmp.c` yet - the registry exists, but nothing in the XML grammar consumes it. - old functions in `snmp-ups-helpers.c` moved up to `dmf_stdlib.c`, but not yet removed from the former file, to avoid breaking existing code until the new functions are fully wired in. - probably more mapping subdrivers can be converted to use the new `dmf_stdlib` functions, but that is left for follow-up work. Co-authored-by: Claude Sonnet Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…allocating based on it Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…rop) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit ec31276 is temporarily available: NUT-tarballs-PR-3615.zip. |
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Sep 2, 2026
…networkupstools#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…networkupstools#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
FTY-revise-20260901
branch
from
September 2, 2026 22:04
8152a85 to
c52cae3
Compare
|
❌ Build nut 2.8.5.5204-FTY failed (commit e0f5257639 by @jimklimov) |
|
❌ Build nut 2.8.5.5208-FTY failed (commit 8ad6d77e0a by @jimklimov) |
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Sep 3, 2026
…ls#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
FTY-revise-20260901
branch
from
September 3, 2026 12:27
cf66c81 to
4bf5bbb
Compare
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Sep 3, 2026
…ls#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
FTY-revise-20260901
branch
from
September 3, 2026 14:08
4bf5bbb to
43ccb69
Compare
|
❌ Build nut 2.8.5.5211-FTY failed (commit f8eae88877 by @jimklimov) |
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Sep 3, 2026
…ls#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
FTY-revise-20260901
branch
from
September 3, 2026 16:14
43ccb69 to
67bb6b6
Compare
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Sep 3, 2026
…ls#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
FTY-revise-20260901
branch
from
September 3, 2026 20:29
67bb6b6 to
1174d37
Compare
…ls#3615] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
force-pushed
the
FTY-revise-20260901
branch
from
September 3, 2026 22:40
1174d37 to
ec31276
Compare
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.
After some analysis, a lot of active data manipulations can be done by relatively few methods predefined in C and used in classic mappings same as in DMF variants -- to the point that many use-cases would not employ LUA at all.
This PR reshuffles related code and recipes to aid in this effort (there would be more work to actually benefit from this in XML DMF handling). Burned through a month's allowance in CoPilot already in the first couple of days, and another in the last day of August, so maybe will follow up much later or find another provider to pick up the torch. Still, thanks to GitHub for sponsoring maintainers to have an allowance at all.
This PR also fixes a couple of potential memory errors in older DMF code, found while CoPilot read through the feature code.