X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/c02dcc9610e66ebe6154e60dcd2f109c90eb09df..fa7c556d251ebcb41ef9709b4d85a2c820dee94b:/src/lbxtool.c diff --git a/src/lbxtool.c b/src/lbxtool.c index f393eaa..9c4b57b 100644 --- a/src/lbxtool.c +++ b/src/lbxtool.c @@ -26,7 +26,7 @@ #include "tools.h" #include "lbx.h" - +#include "error.h" static void printusage(void) { @@ -166,8 +166,7 @@ int extract(LBX *lbx, int verbose, char **argv) { file = lbx_file_open(lbx, i); if (!file) { - errmsg("failed to open archive member %s: %s.\n", - stat.name, lbx_strerror()); + errmsg("%s: %s.\n", stat.name, lbx_errmsg()); continue; } @@ -241,7 +240,7 @@ int main(int argc, char **argv) lbx = lbx_open(&stdin_handle, &lbx_pipe_fops, NULL, "stdin"); if (!lbx) { - errmsg("failed to open archive: %s.\n", lbx_strerror()); + errmsg("%s: %s.\n", file ? file : "stdin", lbx_errmsg()); return EXIT_FAILURE; }