summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-30 08:18:15 -0400
committermidipix <writeonce@midipix.org>2016-04-30 08:18:15 -0400
commitfd1cb820043c445d06f76ce5ab00be232bf36c27 (patch)
treecce513661ff2fb31788123cf74254d8c9c74f753
parentdf07fbfa9bfb2d04b459080ca1b2e8c69c5631dc (diff)
downloadslibtool-fd1cb820043c445d06f76ce5ab00be232bf36c27.tar.bz2
slibtool-fd1cb820043c445d06f76ce5ab00be232bf36c27.tar.xz
utility: display last system error at exit as needed.
-rw-r--r--src/slibtool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slibtool.c b/src/slibtool.c
index bc3584b..42d604f 100644
--- a/src/slibtool.c
+++ b/src/slibtool.c
@@ -67,6 +67,9 @@ static void slibtool_perform_unit_actions(struct slbt_unit_ctx * uctx)
static int slibtool_exit(struct slbt_driver_ctx * dctx, int nerrors)
{
+ if (nerrors && errno)
+ strerror(errno);
+
slbt_free_driver_ctx(dctx);
return nerrors ? 2 : 0;
}