diff options
author | midipix <writeonce@midipix.org> | 2018-08-05 04:29:18 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-08-05 04:52:35 -0400 |
commit | ec000532ee50c64e66a76114b745f6804901bab9 (patch) | |
tree | 4c70470fd701720ae84b0bbfe269b7699e28a729 /src/internal | |
parent | 30077e892fcb1a6b6ec01e74af060fc11e7a067f (diff) | |
download | ntux-ec000532ee50c64e66a76114b745f6804901bab9.tar.bz2 ntux-ec000532ee50c64e66a76114b745f6804901bab9.tar.xz |
driver, library interfaces: support alternate fd's for input/output/error/log.
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/ntux_driver_impl.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/internal/ntux_driver_impl.h b/src/internal/ntux_driver_impl.h index 32e3d1f..e55fdb6 100644 --- a/src/internal/ntux_driver_impl.h +++ b/src/internal/ntux_driver_impl.h @@ -30,6 +30,7 @@ enum app_tags { struct ntux_driver_ctx_impl { struct ntux_common_ctx cctx; struct ntux_driver_ctx ctx; + struct ntux_fd_ctx fdctx; struct __psx_context xctx; const struct ntux_unit_ctx *euctx; const char * eunit; @@ -66,4 +67,46 @@ static inline void ntux_driver_set_ectx( ictx->eunit = unit; } +static inline int ntux_driver_fdin(const struct ntux_driver_ctx * dctx) +{ + struct ntux_fd_ctx fdctx; + ntux_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdin; +} + +static inline int ntux_driver_fdout(const struct ntux_driver_ctx * dctx) +{ + struct ntux_fd_ctx fdctx; + ntux_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdout; +} + +static inline int ntux_driver_fderr(const struct ntux_driver_ctx * dctx) +{ + struct ntux_fd_ctx fdctx; + ntux_get_driver_fdctx(dctx,&fdctx); + return fdctx.fderr; +} + +static inline int ntux_driver_fdlog(const struct ntux_driver_ctx * dctx) +{ + struct ntux_fd_ctx fdctx; + ntux_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdlog; +} + +static inline int ntux_driver_fdcwd(const struct ntux_driver_ctx * dctx) +{ + struct ntux_fd_ctx fdctx; + ntux_get_driver_fdctx(dctx,&fdctx); + return fdctx.fdcwd; +} + +static inline int ntux_driver_fddst(const struct ntux_driver_ctx * dctx) +{ + struct ntux_fd_ctx fdctx; + ntux_get_driver_fdctx(dctx,&fdctx); + return fdctx.fddst; +} + #endif |