summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-24 23:09:30 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:54 -0500
commitcee41b5403811e6eb59dea5b85a75588873bebc5 (patch)
tree29b602c1245cc607b54863b005647fa507f1f38d
parent0d161c919f4c78f4218fc303e69afc64410da732 (diff)
downloadperk-cee41b5403811e6eb59dea5b85a75588873bebc5.tar.bz2
perk-cee41b5403811e6eb59dea5b85a75588873bebc5.tar.xz
pe_get_unit_ctx(): improved error trace report.
-rw-r--r--src/driver/pe_unit_ctx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/driver/pe_unit_ctx.c b/src/driver/pe_unit_ctx.c
index 06a53f9..2845689 100644
--- a/src/driver/pe_unit_ctx.c
+++ b/src/driver/pe_unit_ctx.c
@@ -34,7 +34,8 @@ int pe_get_unit_ctx(
int prot;
if (!dctx)
- return PERK_CUSTOM_ERROR(dctx,0);
+ return PERK_CUSTOM_ERROR(
+ dctx,PERK_ERR_NULL_CONTEXT);
else if (!(ctx = calloc(1,sizeof(*ctx))))
return PERK_BUFFER_ERROR(dctx);
@@ -45,7 +46,7 @@ int pe_get_unit_ctx(
if (pe_map_raw_image(dctx,dctx->cctx->ioctx->fdin,path,prot,&ctx->map))
return pe_free_unit_ctx_impl(ctx,
- PERK_SYSTEM_ERROR(dctx));
+ PERK_NESTED_ERROR(dctx));
if (pe_get_image_meta(dctx,&ctx->map,&ctx->meta))
return pe_free_unit_ctx_impl(ctx,