Currently, the function logs errors itself. However it has no context, so the message is unspecific. To help users better, drop that log and have all callers check the return code and log an appropriate error. Also, the function should return pcmk_rc_bad_input rather than EINVAL since it's a user error rather than coding error.
Description
Description
Event Timeline
Comment Actions
Additionally, it would be nice to have a unit test or two for this function. Most of what it does is call another function, several of which are already unit tested, but checking that the inputs/outputs are as expected would be good.