[00/13] libfrog/xfs_scrub: fix error handling
mbox series

Message ID 156944720314.297677.12837037497727069563.stgit@magnolia
Headers show
Series
  • libfrog/xfs_scrub: fix error handling
Related show

Message

Darrick J. Wong Sept. 25, 2019, 9:33 p.m. UTC
Hi all,

The new code introduced by xfs_scrub do not deal with error returns in a
consistent fashion.  Some places we return -1 and set errno, some places
just do whatever libc does, others return positive error codes, and the
worst offenders do a combination of that.  Worse yet, sometimes we also
fail to check for error returns at all.

This series replaces all that with a single error handling strategy --
return positive error codes and always check the return codes from other
library functions.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=libfrog-error-handling