HomeClusterLabs Projects

Fix: libcrmcommon,tools: improve XML write error handling

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Fix: libcrmcommon,tools: improve XML write error handling

The write_xml_*() functions previously would return -1 on error
(only sometimes setting errno for more information) and sometimes
0 (when compressed) or the number of bytes written (when uncompressed) on
success.

Some callers were relying on the return value being -errno, others relied on
errno being set if the return value was negative, and others relied on positive
values indicating success.

Now, the functions always return -errno on error, and the number of bytes
written (whether compressed or uncompressed) on success, and callers treat it
as such.

Also, error log messages have been improved.

Details

Provenance
kgaillotAuthored on Jan 5 2018, 1:19 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.