summaryrefslogtreecommitdiffstats
path: root/src/wgtpkg-install.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-10-31 14:06:07 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-10-31 14:08:31 +0100
commite30b5998910afc888c9b4a79afb47e5d3fe4b3c4 (patch)
treefbea1f20522c490dfca530d969c09a428adddb33 /src/wgtpkg-install.c
parent5e70cbd233bba0322731914550c26b3388c93323 (diff)
afm-system-daemon: Improve error message report
Bug-AGL: SPEC-1872 Change-Id: I6e48baa05312b1490edd38ccf9231afe4aa6eb51 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-install.c')
-rw-r--r--src/wgtpkg-install.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c
index 5e8b0e9..31ef7c4 100644
--- a/src/wgtpkg-install.c
+++ b/src/wgtpkg-install.c
@@ -503,7 +503,7 @@ struct wgt_info *install_widget(const char *wgtfile, const char *root, int force
struct wgt_info *ifo;
const struct wgt_desc *desc;
char installdir[PATH_MAX];
- int port;
+ int port, err;
struct unitconf uconf;
NOTICE("-- INSTALLING widget %s to %s --", wgtfile, root);
@@ -578,7 +578,9 @@ error3:
wgt_info_unref(ifo);
error2:
+ err = errno;
remove_workdir();
+ errno = err;
error1:
file_reset();