]> git.draconx.ca Git - liblbx.git/commit
liblbx: Properly report errors in lbx_(img_)fopen.
authorNick Bowler <nbowler@draconx.ca>
Wed, 12 Jun 2013 01:07:30 +0000 (21:07 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 14 Jun 2013 20:35:08 +0000 (16:35 -0400)
commite7aea0c6f323c6bbf364093305e60bb78999a23f
tree10ceb5513cb38fa2a4029a39c62ce35827ea50ae
parent4d1c91362ed7719a1371ad977afd95f79821974f
liblbx: Properly report errors in lbx_(img_)fopen.

The lbx_fopen and lbx_img_fopen functions were not properly pushing an
error code when they failed, leading to extremely helpful messages of
the form:

  lbximg: failed to open image: Success.

It further turns out that pushing negative errors (i.e., -errno) was
documented but never actually tested or used, so fix that up, too.
It is likely that many other sites are lacking appropriate calls to
lbx_error_raise, which can be added later.
src/error.c
src/image.c
src/lbx.c