summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-28 15:19:43 -0400
committermidipix <writeonce@midipix.org>2016-04-28 15:21:05 -0400
commit9b5eecc5353d43c6635a066dbd288154a9eb1ea6 (patch)
tree593f0a7e43bb0b55021480f5df3b36d67410fbf0
parent6689068df459076614129bdb9505ccbcef07e34c (diff)
downloadslibtool-9b5eecc5353d43c6635a066dbd288154a9eb1ea6.tar.bz2
slibtool-9b5eecc5353d43c6635a066dbd288154a9eb1ea6.tar.xz
driver: properly handle -o in install mode.
-rw-r--r--include/slibtool/slibtool.h1
-rw-r--r--src/driver/slbt_driver_ctx.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h
index 3268a3e..aacaa2b 100644
--- a/include/slibtool/slibtool.h
+++ b/include/slibtool/slibtool.h
@@ -193,6 +193,7 @@ struct slbt_common_ctx {
const char * release;
const char * symfile;
const char * regex;
+ const char * user;
char ** targv;
char ** cargv;
};
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 4815d34..29caf2c 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -916,6 +916,12 @@ int slbt_get_driver_ctx(
nunits++;
}
+ /* -o in install mode means USER */
+ if ((cctx.mode == SLBT_MODE_INSTALL) && cctx.output) {
+ cctx.user = cctx.output;
+ cctx.output = 0;
+ }
+
/* driver context */
if (!(ctx = slbt_driver_ctx_alloc(meta,&cctx,nunits)))
return slbt_get_driver_ctx_fail(meta);