summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-09-02 16:52:28 -0400
committermidipix <writeonce@midipix.org>2016-09-03 23:23:13 -0400
commit8069c3cdd4ce1d08bc67d26e2a3b483b5c89f50d (patch)
tree9d4da0f14fc0039aae7033c9feae32397472e7d9 /src/driver
parent5bf1b058baa3acee54cad80f0d378f105808b555 (diff)
downloadslibtool-8069c3cdd4ce1d08bc67d26e2a3b483b5c89f50d.tar.bz2
slibtool-8069c3cdd4ce1d08bc67d26e2a3b483b5c89f50d.tar.xz
driver: slbt_set_alternate_host(): added error trace support.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 3ca33c1..9c664d3 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -13,6 +13,7 @@
#include <slibtool/slibtool.h>
#include "slibtool_version.h"
#include "slibtool_driver_impl.h"
+#include "slibtool_errinfo_impl.h"
#include "argv/argv.h"
/* package info */
@@ -1177,11 +1178,11 @@ int slbt_set_alternate_host(
slbt_free_host_params(&ictx->ctx.ahost);
if (!(ictx->ctx.ahost.host = strdup(host)))
- return -1;
+ return SLBT_SYSTEM_ERROR(ctx);
if (!(ictx->ctx.ahost.flavor = strdup(flavor))) {
slbt_free_host_params(&ictx->ctx.ahost);
- return -1;
+ return SLBT_SYSTEM_ERROR(ctx);
}
ictx->ctx.cctx.ahost.host = ictx->ctx.ahost.host;
@@ -1193,7 +1194,7 @@ int slbt_set_alternate_host(
&ictx->ctx.cctx.ahost,
&ictx->ctx.cctx.acfgmeta)) {
slbt_free_host_params(&ictx->ctx.ahost);
- return -1;
+ return SLBT_CUSTOM_ERROR(ctx,0);
}
slbt_init_flavor_settings(
@@ -1205,7 +1206,7 @@ int slbt_set_alternate_host(
&ictx->ctx.cctx,
&ictx->ctx.cctx.ahost)) {
slbt_free_host_params(&ictx->ctx.ahost);
- return -1;
+ return SLBT_CUSTOM_ERROR(ctx,0);
}
return 0;