summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/mdso_driver_ctx.c7
-rw-r--r--src/internal/mdso_driver_impl.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c
index a485320..d100c0a 100644
--- a/src/driver/mdso_driver_ctx.c
+++ b/src/driver/mdso_driver_ctx.c
@@ -78,6 +78,7 @@ static struct mdso_driver_ctx_impl * mdso_driver_ctx_alloc(
size_t size;
struct argv_entry * entry;
const char ** units;
+ int elements;
size = sizeof(struct mdso_driver_ctx_alloc);
size += (nunits+1)*sizeof(const char *);
@@ -92,9 +93,15 @@ static struct mdso_driver_ctx_impl * mdso_driver_ctx_alloc(
if (!entry->fopt)
*units++ = entry->arg;
+ elements = sizeof(ictx->ctx.erribuf) / sizeof(*ictx->ctx.erribuf);
+
+ ictx->ctx.errinfp = &ictx->ctx.erriptr[0];
+ ictx->ctx.erricap = &ictx->ctx.erriptr[--elements];
+
ictx->meta = meta;
ictx->ctx.fdtmpin = -1;
ictx->ctx.ctx.units = ictx->units;
+ ictx->ctx.ctx.errv = ictx->ctx.errinfp;
return &ictx->ctx;
}
diff --git a/src/internal/mdso_driver_impl.h b/src/internal/mdso_driver_impl.h
index a697528..c6131b8 100644
--- a/src/internal/mdso_driver_impl.h
+++ b/src/internal/mdso_driver_impl.h
@@ -32,6 +32,10 @@ struct mdso_driver_ctx_impl {
char * asmbase;
int fddst;
int fdtmpin;
+ struct mdso_error_info**errinfp;
+ struct mdso_error_info**erricap;
+ struct mdso_error_info *erriptr[64];
+ struct mdso_error_info erribuf[64];
};
struct mdso_unit_ctx_impl {