summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_install.c
diff options
context:
space:
mode:
authorKylie McClain <kylie@somasis.com>2016-11-01 22:48:45 -0400
committermidipix <writeonce@midipix.org>2016-11-01 23:53:05 -0400
commit7ce25c2d6605d10466a9e8d8742fe1ed5e231709 (patch)
tree65172148197a052f12b4be4ec2996a650d7d2e7d /src/logic/slbt_exec_install.c
parent4a7f9941e0b15da74e7ff81a4092169396ae8f61 (diff)
downloadslibtool-7ce25c2d6605d10466a9e8d8742fe1ed5e231709.tar.bz2
slibtool-7ce25c2d6605d10466a9e8d8742fe1ed5e231709.tar.xz
error trace: use descriptive errcodes for invocations of SLBT_CUSTOM_ERROR.
Diffstat (limited to 'src/logic/slbt_exec_install.c')
-rw-r--r--src/logic/slbt_exec_install.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index 75fb263..b5c1587 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -117,7 +117,7 @@ static int slbt_exec_install_import_libraries(
/* (dso is under .libs) */
if (!(slash = strrchr(srcbuf,'/')))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
/* libfoo.so.x.y.z */
if ((size_t)snprintf(implib,sizeof(implib),"%s",
@@ -125,14 +125,14 @@ static int slbt_exec_install_import_libraries(
- strlen(dctx->cctx->settings.impsuffix))
return SLBT_BUFFER_ERROR(dctx);
- /* guard againt an infinitely long version */
+ /* guard against an infinitely long version */
mark = srcbuf + strlen(srcbuf);
/* rev */
if (!(dot = strrchr(srcbuf,'.')))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
else if ((size_t)(mark - dot) > sizeof(rev))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_REV);
else {
strcpy(rev,dot);
*dot = 0;
@@ -140,9 +140,9 @@ static int slbt_exec_install_import_libraries(
/* minor */
if (!(dot = strrchr(srcbuf,'.')))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
else if ((size_t)(mark - dot) > sizeof(minor))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_REV);
else {
strcpy(minor,dot);
*dot = 0;
@@ -150,16 +150,16 @@ static int slbt_exec_install_import_libraries(
/* major */
if (!(dot = strrchr(srcbuf,'.')))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
else if ((size_t)(mark - dot) > sizeof(major))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_REV);
else {
strcpy(major,dot);
*dot = 0;
}
if (!(dot = strrchr(srcbuf,'.')))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
/* .libs/libfoo.so.def.host */
if ((size_t)snprintf(hostlnk,sizeof(hostlnk),"%s.def.host",
@@ -172,7 +172,7 @@ static int slbt_exec_install_import_libraries(
/* host/flabor */
if (!(host = strrchr(hosttag,'.')))
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
else
host++;
@@ -491,12 +491,12 @@ static int slbt_exec_install_entry(
if ((dot = strrchr(slnkname,'.')))
*dot = 0;
else
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
if ((dot = strrchr(slnkname,'.')))
*dot = 0;
else
- return SLBT_CUSTOM_ERROR(dctx,0);
+ return SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FLOW);
/* destination symlink: dstdir/libfoo.so.x */
if ((size_t)snprintf(dlnkname,sizeof(dlnkname),"%s/%s",
@@ -581,7 +581,7 @@ int slbt_exec_install(
: ARGV_VERBOSITY_NONE)))
return slbt_exec_install_fail(
actx,meta,
- SLBT_CUSTOM_ERROR(dctx,0));
+ SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FAIL));
/* dest, alternate argument vector options */
argv = ectx->altv;