HomeClusterLabs Projects

Refactor: libcrmcommon: Use the new bz2-related error code.

Description

Refactor: libcrmcommon: Use the new bz2-related error code.

In the various places where we're calling some bzip2 library function
and getting an error code back from it, translate that into a standard
pacemaker return code then get an error message just like we do for all
other errors.

This has a couple other effects:

  • Where crm_ipc_decompress previously returned EILSEQ, now return a standard pacemaker return code. That was probably not the right value to return in this case anyway, since the error message indicates it's for multibyte characters. Callers really only care if there was an error or not, and squash the return code down to a legacy one anyway.
  • Where pcmk__compress previously returned pcmk_rc_error, now return a standard pacemaker return code. Here again, the callers really only care about error or not.
  • Remove the unit test for bz2_strerror, which is about to be deprecated.

Details

Provenance
clumensAuthored on Jul 27 2023, 12:19 PM
Parents
rPc9b6191e4292: Feature: libcrmcommon: Add pcmk__bzlib2rc.
Branches
Unknown
Tags
Unknown