summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-26 01:28:54 -0400
committermidipix <writeonce@midipix.org>2016-10-26 01:28:54 -0400
commitcacd3e5f0c08e96e3bd7fbaebb3bbec3ec3751c1 (patch)
treea3706492a2f77ee7ed1fc9524829481ffb575ea5 /src/internal
parent8ad14bb42706ebf7fe510df76c38e0a3bfa11601 (diff)
downloadslibtool-cacd3e5f0c08e96e3bd7fbaebb3bbec3ec3751c1.tar.bz2
slibtool-cacd3e5f0c08e96e3bd7fbaebb3bbec3ec3751c1.tar.xz
driver: struct slbt_error_info: extend and refactor.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/slibtool_errinfo_impl.c25
-rw-r--r--src/internal/slibtool_errinfo_impl.h16
2 files changed, 21 insertions, 20 deletions
diff --git a/src/internal/slibtool_errinfo_impl.c b/src/internal/slibtool_errinfo_impl.c
index 889f566..c12241d 100644
--- a/src/internal/slibtool_errinfo_impl.c
+++ b/src/internal/slibtool_errinfo_impl.c
@@ -10,12 +10,12 @@
int slbt_record_error(
const struct slbt_driver_ctx * dctx,
- int syserror,
- int liberror,
- const char * function,
- int line,
- unsigned flags,
- void * ctx)
+ int esyscode,
+ int elibcode,
+ const char * efunction,
+ int eline,
+ unsigned eflags,
+ void * eany)
{
struct slbt_driver_ctx_impl * ictx;
struct slbt_error_info * erri;
@@ -28,12 +28,13 @@ int slbt_record_error(
*ictx->errinfp = &ictx->erribuf[ictx->errinfp - ictx->erriptr];
erri = *ictx->errinfp;
- erri->syserror = syserror;
- erri->liberror = liberror;
- erri->function = function;
- erri->line = line;
- erri->flags = flags;
- erri->ctx = ctx;
+ erri->edctx = dctx;
+ erri->esyscode = esyscode;
+ erri->elibcode = elibcode;
+ erri->efunction = efunction;
+ erri->eline = eline;
+ erri->eflags = eflags;
+ erri->eany = eany;
ictx->errinfp++;
diff --git a/src/internal/slibtool_errinfo_impl.h b/src/internal/slibtool_errinfo_impl.h
index c830975..23c8263 100644
--- a/src/internal/slibtool_errinfo_impl.h
+++ b/src/internal/slibtool_errinfo_impl.h
@@ -9,12 +9,12 @@
int slbt_record_error(
const struct slbt_driver_ctx *,
- int syserror,
- int liberror,
- const char * function,
- int line,
- unsigned flags,
- void * ctx);
+ int esyscode,
+ int elibcode,
+ const char * efunction,
+ int eline,
+ unsigned eflags,
+ void * eany);
#define SLBT_SYSTEM_ERROR(dctx) \
slbt_record_error( \
@@ -58,11 +58,11 @@ int slbt_record_error(
SLBT_ERROR_TOP_LEVEL, \
0)
-#define SLBT_CUSTOM_ERROR(dctx,liberror) \
+#define SLBT_CUSTOM_ERROR(dctx,elibcode) \
slbt_record_error( \
dctx, \
0, \
- liberror, \
+ elibcode, \
__func__, \
__LINE__, \
SLBT_ERROR_TOP_LEVEL \