HomeClusterLabs Projects

Refactor: libpacemaker: Use time_t with pacemakerd-health message

Description

Refactor: libpacemaker: Use time_t with pacemakerd-health message

And use reasonable defaults for sys_from if it's NULL.

Now, passing the pacemakerd-health formatter functions a time_t argument
of 0 indicates "unknown time" (note: NOT "use current time"). Passing
any other value triggers a call to pcmk__epoch2str() to get a string
representation.

This avoids some work at the caller side, where we
previously converted a time_t to a crm_time_t and finally to a string,
before passing to a pacemakerd-health formatter.

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

Details

Provenance
nrwahl2Authored on Nov 1 2022, 4:56 PM
Parents
rP20acec170b34: Refactor: libcrmcommon: pcmk__epoch2str() accepts flags and is non-const
Branches
Unknown
Tags
Unknown