diff options
Diffstat (limited to 'src/driver/slbt_driver_ctx.c')
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index baf08fb..3ca33c1 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -152,6 +152,7 @@ static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc( size_t size; struct argv_entry * entry; const char ** units; + int elements; size = sizeof(struct slbt_driver_ctx_alloc); size += (nunits+1)*sizeof(const char *); @@ -166,8 +167,14 @@ static struct slbt_driver_ctx_impl * slbt_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.ctx.units = ictx->units; + ictx->ctx.ctx.errv = ictx->ctx.errinfp; return &ictx->ctx; } |