summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-07-30 11:12:23 +0000
committermidipix <writeonce@midipix.org>2018-08-03 21:13:29 -0400
commitf1dbc60ab6cc4bc2422441c9028c7edc56684b82 (patch)
tree5a87872c2e7f8882355680dc56bda3d6d88a8b84 /include
parent69198475911da5e1f543178bc0a801aac5ff2bc0 (diff)
downloadmdso-f1dbc60ab6cc4bc2422441c9028c7edc56684b82.tar.bz2
mdso-f1dbc60ab6cc4bc2422441c9028c7edc56684b82.tar.xz
driver, library interfaces: support alternate fd's for input/output/error/log.
Diffstat (limited to 'include')
-rw-r--r--include/mdso/mdso.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/mdso/mdso.h b/include/mdso/mdso.h
index 5916ddf..2b09491 100644
--- a/include/mdso/mdso.h
+++ b/include/mdso/mdso.h
@@ -77,6 +77,15 @@ struct mdso_source_version {
const char * commit;
};
+struct mdso_fd_ctx {
+ int fdin;
+ int fdout;
+ int fderr;
+ int fdlog;
+ int fdcwd;
+ int fddst;
+};
+
struct mdso_object {
void * addr;
size_t size;
@@ -130,9 +139,11 @@ struct mdso_unit_ctx {
/* driver api */
mdso_api int mdso_get_driver_ctx (char ** argv, char ** envp, uint32_t flags,
+ const struct mdso_fd_ctx *,
struct mdso_driver_ctx **);
mdso_api int mdso_create_driver_ctx (const struct mdso_common_ctx *,
+ const struct mdso_fd_ctx *,
struct mdso_driver_ctx **);
mdso_api void mdso_free_driver_ctx (struct mdso_driver_ctx *);
@@ -142,13 +153,16 @@ mdso_api int mdso_get_unit_ctx (const struct mdso_driver_ctx *, const c
mdso_api void mdso_free_unit_ctx (struct mdso_unit_ctx *);
+mdso_api int mdso_get_driver_fdctx (const struct mdso_driver_ctx *, struct mdso_fd_ctx *);
+mdso_api int mdso_set_driver_fdctx (struct mdso_driver_ctx *, const struct mdso_fd_ctx *);
+
/* helper api */
mdso_api FILE*mdso_create_archive (const struct mdso_driver_ctx *, const char * arname);
mdso_api FILE*mdso_create_asmsrc (const struct mdso_driver_ctx *, const char * asmname);
mdso_api FILE*mdso_create_object (const struct mdso_driver_ctx *, const char * objname);
/* utility api */
-mdso_api int mdso_main (int, char **, char **);
+mdso_api int mdso_main (int, char **, char **, const struct mdso_fd_ctx *);
mdso_api int mdso_create_implib_archive(const struct mdso_driver_ctx *);
mdso_api int mdso_create_implib_sources(const struct mdso_driver_ctx *);
mdso_api int mdso_create_implib_objects(const struct mdso_driver_ctx *);