HomeClusterLabs Projects

Refactor: tools: Overhaul input option storage in crm_diff.c
44295516330fUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Refactor: tools: Overhaul input option storage in crm_diff.c

It's simpler to use multiple strings than to have a boolean represent
whether a file name should be treated as a raw string.

When we can make the input precedence sane at a compatibility break, an
enum for input source will likely make the most sense. Then we can bring
back callbacks to set the enum value.

Also rename "apply" to "patch" for clarity, and use G_OPTION_FLAG_NONE.

It's okay to continue passing options.source_file to generate_patch().
In the past, if it were a raw XML string, we would pass that as the
argument. That's not a pretty prefix for logging XML.

Use G_OPTION_ARG_NONE where appropriate.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 17 2025, 5:52 PM
Parents
rP3584d434a0fd: Doc: tools: Document input source precedence in crm_diff help output
Branches
Unknown
Tags
Unknown

Event Timeline