diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/pe_driver_ctx.c | 7 | ||||
-rw-r--r-- | src/internal/perk_driver_impl.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c index 29fd7c8..7ef510e 100644 --- a/src/driver/pe_driver_ctx.c +++ b/src/driver/pe_driver_ctx.c @@ -74,6 +74,7 @@ static struct pe_driver_ctx_impl * pe_driver_ctx_alloc( size_t size; struct argv_entry * entry; const char ** units; + int elements; size = sizeof(struct pe_driver_ctx_alloc); size += (nunits+1)*sizeof(const char *); @@ -84,6 +85,11 @@ static struct pe_driver_ctx_impl * pe_driver_ctx_alloc( if (cctx) memcpy(&ictx->ctx.cctx,cctx,sizeof(*cctx)); + 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.cctx.symctx = &ictx->ctx.symctx; ictx->ctx.cctx.outctx = &ictx->ctx.outctx; @@ -96,6 +102,7 @@ static struct pe_driver_ctx_impl * pe_driver_ctx_alloc( *units++ = entry->arg; ictx->ctx.ctx.units = ictx->units; + ictx->ctx.ctx.errv = ictx->ctx.errinfp; return &ictx->ctx; } diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h index 7e9e4f7..5063fa1 100644 --- a/src/internal/perk_driver_impl.h +++ b/src/internal/perk_driver_impl.h @@ -29,6 +29,10 @@ struct pe_driver_ctx_impl { struct pe_io_ctx ioctx; struct pe_common_ctx cctx; struct pe_driver_ctx ctx; + struct pe_error_info ** errinfp; + struct pe_error_info ** erricap; + struct pe_error_info * erriptr[64]; + struct pe_error_info erribuf[64]; }; struct pe_unit_ctx_impl { |