diff options
author | midipix <writeonce@midipix.org> | 2018-06-27 03:51:35 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-06-27 07:30:01 -0400 |
commit | a82cc2f34bddae9b79e582a3bcc6b2c9cbb5009b (patch) | |
tree | 1d0de0094b350cf323b6ea8ee44f571918048789 /src/logic/slbt_exec_install.c | |
parent | 6088476d902b8bcbf688ce7cb6055a4c47c2d0b7 (diff) | |
download | slibtool-a82cc2f34bddae9b79e582a3bcc6b2c9cbb5009b.tar.bz2 slibtool-a82cc2f34bddae9b79e582a3bcc6b2c9cbb5009b.tar.xz |
driver, library interfaces: support alternate fd's for input/output/error/log.
Diffstat (limited to 'src/logic/slbt_exec_install.c')
-rw-r--r-- | src/logic/slbt_exec_install.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c index c00215a..e15a4b2 100644 --- a/src/logic/slbt_exec_install.c +++ b/src/logic/slbt_exec_install.c @@ -23,6 +23,7 @@ #include "argv/argv.h" static int slbt_install_usage( + int fdout, const char * program, const char * arg, const struct argv_option ** optv, @@ -35,7 +36,7 @@ static int slbt_install_usage( "Options:\n", program); - argv_usage(STDOUT_FILENO,header,optv,arg); + argv_usage(fdout,header,optv,arg); argv_free(meta); return SLBT_USAGE; @@ -536,6 +537,7 @@ int slbt_exec_install( struct slbt_exec_ctx * ectx) { int ret; + int fdout; char ** argv; char ** iargv; char ** src; @@ -565,6 +567,7 @@ int slbt_exec_install( slbt_reset_arguments(ectx); slbt_disable_placeholders(ectx); iargv = ectx->cargv; + fdout = slbt_driver_fdout(dctx); /* work around non-conforming uses of --mode=install */ if (!(strcmp(iargv[0],"/bin/sh")) || !strcmp(iargv[0],"/bin/bash")) @@ -574,16 +577,18 @@ int slbt_exec_install( argv_optv_init(slbt_install_options,optv); if (!iargv[1] && (dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_USAGE)) - return slbt_install_usage(dctx->program,0,optv,0); + return slbt_install_usage( + fdout, + dctx->program, + 0,optv,0); /* <install> argv meta */ if (!(meta = argv_get( - iargv, - optv, + iargv,optv, dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS ? ARGV_VERBOSITY_ERRORS : ARGV_VERBOSITY_NONE, - STDERR_FILENO))) + fdout))) return slbt_exec_install_fail( actx,meta, SLBT_CUSTOM_ERROR(dctx,SLBT_ERR_INSTALL_FAIL)); |