HomeClusterLabs Projects

Low: tools: Fix CIB validation in crm_mon.c

Description

Low: tools: Fix CIB validation in crm_mon.c

0ac9beea introduced a bug wherein we stopped exiting on non-NULL cib. So
exit_on_invalid_cib() works if cib is NULL but does nothing if
cib->variant is invalid. The latter case should never happen, but we use
exit_on_invalid_cib() to handle exactly that.

But even b71146d9, which introduced exit_on_invalid_cib(), had a
misleading error message. "Invalid CIB source" isn't accurate when cib
is NULL.

The duplication will go away in an upcoming commit.

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

Details

Provenance
nrwahl2Authored on Tue, Aug 12, 5:45 AM
Parents
rPcca306851e58: Refactor: libcrmcommon: Drop pcmk__force_args()
Branches
Unknown
Tags
Unknown