From f1dbc60ab6cc4bc2422441c9028c7edc56684b82 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 30 Jul 2018 11:12:23 +0000 Subject: driver, library interfaces: support alternate fd's for input/output/error/log. --- src/internal/mdso_driver_impl.h | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'src/internal') diff --git a/src/internal/mdso_driver_impl.h b/src/internal/mdso_driver_impl.h index 8fe6f35..fc4782f 100644 --- a/src/internal/mdso_driver_impl.h +++ b/src/internal/mdso_driver_impl.h @@ -48,6 +48,7 @@ struct mdso_expsyms { struct mdso_driver_ctx_impl { struct mdso_common_ctx cctx; struct mdso_driver_ctx ctx; + struct mdso_fd_ctx fdctx; char * asmbase; char * implib; int fddst; @@ -93,4 +94,46 @@ static inline void mdso_driver_set_ectx( ictx->eunit = unit; } +static inline int mdso_driver_fdin(const struct mdso_driver_ctx * dctx) +{ + struct mdso_fd_ctx fdctx; + mdso_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdin; +} + +static inline int mdso_driver_fdout(const struct mdso_driver_ctx * dctx) +{ + struct mdso_fd_ctx fdctx; + mdso_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdout; +} + +static inline int mdso_driver_fderr(const struct mdso_driver_ctx * dctx) +{ + struct mdso_fd_ctx fdctx; + mdso_get_driver_fdctx(dctx,&fdctx); + return fdctx.fderr; +} + +static inline int mdso_driver_fdlog(const struct mdso_driver_ctx * dctx) +{ + struct mdso_fd_ctx fdctx; + mdso_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdlog; +} + +static inline int mdso_driver_fdcwd(const struct mdso_driver_ctx * dctx) +{ + struct mdso_fd_ctx fdctx; + mdso_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdcwd; +} + +static inline int mdso_driver_fddst(const struct mdso_driver_ctx * dctx) +{ + struct mdso_fd_ctx fdctx; + mdso_get_driver_fdctx(dctx,&fdctx); + return fdctx.fddst; +} + #endif -- cgit v1.2.3