summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-25 16:49:10 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:54 -0500
commitf006c46ea91111f1df8bf0ce7cf457e22f4c26f7 (patch)
tree525e9dc934117bd388ad81bda65ad6efdb23f6db /src/internal
parente2d4c06d82afc047b4c42e418409fc20c6f8090d (diff)
downloadperk-f006c46ea91111f1df8bf0ce7cf457e22f4c26f7.tar.bz2
perk-f006c46ea91111f1df8bf0ce7cf457e22f4c26f7.tar.xz
driver: struct pe_error_info: extend and refactor.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/perk_errinfo_impl.c25
-rw-r--r--src/internal/perk_errinfo_impl.h16
2 files changed, 21 insertions, 20 deletions
diff --git a/src/internal/perk_errinfo_impl.c b/src/internal/perk_errinfo_impl.c
index df01b3b..bd082d4 100644
--- a/src/internal/perk_errinfo_impl.c
+++ b/src/internal/perk_errinfo_impl.c
@@ -10,12 +10,12 @@
int pe_record_error(
const struct pe_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 pe_driver_ctx_impl * ictx;
struct pe_error_info * erri;
@@ -28,12 +28,13 @@ int pe_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/perk_errinfo_impl.h b/src/internal/perk_errinfo_impl.h
index f9bd80c..9fac492 100644
--- a/src/internal/perk_errinfo_impl.h
+++ b/src/internal/perk_errinfo_impl.h
@@ -9,12 +9,12 @@
int pe_record_error(
const struct pe_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 * ectx);
#define PERK_SYSTEM_ERROR(dctx) \
pe_record_error( \
@@ -58,11 +58,11 @@ int pe_record_error(
PERK_ERROR_TOP_LEVEL, \
0)
-#define PERK_CUSTOM_ERROR(dctx,liberror) \
+#define PERK_CUSTOM_ERROR(dctx,elibcode) \
pe_record_error( \
dctx, \
0, \
- liberror, \
+ elibcode, \
__func__, \
__LINE__, \
PERK_ERROR_TOP_LEVEL \