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 /include | |
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 'include')
-rw-r--r-- | include/ntux/ntux.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/ntux/ntux.h b/include/ntux/ntux.h index 07c735b..d43e8ad 100644 --- a/include/ntux/ntux.h +++ b/include/ntux/ntux.h @@ -64,6 +64,15 @@ struct ntux_source_version { const char * commit; }; +struct ntux_fd_ctx { + int fdin; + int fdout; + int fderr; + int fdlog; + int fdcwd; + int fddst; +}; + struct ntux_error_info { const struct ntux_driver_ctx * edctx; const struct ntux_unit_ctx * euctx; @@ -107,17 +116,21 @@ struct ntux_unit_ctx { /* driver api */ ntux_api int ntux_get_driver_ctx (char **, char **, uint32_t, + const struct ntux_fd_ctx *, struct ntux_driver_ctx **); ntux_api void ntux_free_driver_ctx (struct ntux_driver_ctx *); +ntux_api int ntux_get_driver_fdctx (const struct ntux_driver_ctx *, struct ntux_fd_ctx *); +ntux_api int ntux_set_driver_fdctx (struct ntux_driver_ctx *, const struct ntux_fd_ctx *); + /* cmd api */ ntux_api int ntux_cmd_stat (const struct ntux_driver_ctx *, const char *); ntux_api int ntux_cmd_spawn (const struct ntux_driver_ctx *); ntux_api int ntux_cmd_strace (const struct ntux_driver_ctx *); /* utility api */ -ntux_api int ntux_main (int, char **, char **); +ntux_api int ntux_main (int, char **, char **, const struct ntux_fd_ctx *); /* error trace api */ ntux_api int ntux_output_error_vector (const struct ntux_driver_ctx *); |