summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/mdso_driver_ctx.c7
1 files changed, 7 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;
}