summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/helper/slbt_copy_file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/helper/slbt_copy_file.c b/src/helper/slbt_copy_file.c
index 94b2cd0..5448fd6 100644
--- a/src/helper/slbt_copy_file.c
+++ b/src/helper/slbt_copy_file.c
@@ -6,6 +6,7 @@
#include <slibtool/slibtool.h>
#include "slibtool_spawn_impl.h"
+#include "slibtool_errinfo_impl.h"
int slbt_copy_file(
const struct slbt_driver_ctx * dctx,
@@ -36,20 +37,20 @@ int slbt_copy_file(
if (slbt_output_link(dctx,ectx)) {
ectx->argv = oargv;
ectx->program = oprogram;
- return -1;
+ return SLBT_NESTED_ERROR(dctx);
}
} else {
if (slbt_output_install(dctx,ectx)) {
ectx->argv = oargv;
ectx->program = oprogram;
- return -1;
+ return SLBT_NESTED_ERROR(dctx);
}
}
}
/* dlltool spawn */
ret = ((slbt_spawn(ectx,true) < 0) || ectx->exitcode)
- ? -1 : 0;
+ ? SLBT_SYSTEM_ERROR(dctx) : 0;
ectx->argv = oargv;
ectx->program = oprogram;