HomeClusterLabs Projects

Refactor: libcrmcommon: add directory creation function that returns status

Description

Refactor: libcrmcommon: add directory creation function that returns status

crm_build_path() (which logs on error, but doesn't return status to the caller)
is now a wrapper for the new function pcmk__build_path(), which doesn't log on
error but returns status to the caller.

This allows for callers who need to know the status, and/or want to log or
output a custom message.

This also modifies crm_build_path() to not use crm_perror() so that it only
logs, and doesn't write to stderr. This is appropriate for daemons and doesn't
clash with the new output model.

pcmk__build_path() isn't used yet but will come in handy for future projects.

Details

Provenance
kgaillotAuthored on Oct 25 2019, 8:54 PM
Parents
rP50b96d5ae5e8: Refactor: libpe_status: add function to check whether node is part of a bundle
Branches
Unknown
Tags
Unknown

Event Timeline