summaryrefslogtreecommitdiffhomepage
path: root/src/driver/slbt_amain.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-10 08:31:23 +0000
committermidipix <writeonce@midipix.org>2021-06-10 08:31:23 +0000
commit6f41153880f561e092fb7701a2db0facf6b6ffd9 (patch)
tree01f4371826c5cd595b84b81b46b2cbeb25b55e5b /src/driver/slbt_amain.c
parente0e31fbb6cf0f9b1feec89893747dd4df30cebf6 (diff)
downloadslibtool-6f41153880f561e092fb7701a2db0facf6b6ffd9.tar.bz2
slibtool-6f41153880f561e092fb7701a2db0facf6b6ffd9.tar.xz
driver: added --dumpmachine support.
Diffstat (limited to 'src/driver/slbt_amain.c')
-rw-r--r--src/driver/slbt_amain.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/driver/slbt_amain.c b/src/driver/slbt_amain.c
index d364ef4..3f78e76 100644
--- a/src/driver/slbt_amain.c
+++ b/src/driver/slbt_amain.c
@@ -164,6 +164,12 @@ int slbt_main(char ** argv, char ** envp, const struct slbt_fd_ctx * fdctx)
? !argv || !argv[0] || !argv[1] || !argv[2]
: SLBT_ERROR;
+ /* --dumpmachine disables all other actions */
+ if (dctx->cctx->drvflags & SLBT_DRIVER_OUTPUT_MACHINE)
+ return slbt_output_machine(dctx)
+ ? SLBT_ERROR : SLBT_OK;
+
+ /* --version is always the first action */
if (dctx->cctx->drvflags & SLBT_DRIVER_VERSION)
if ((slbt_version(dctx,fdout)) < 0)
return slbt_exit(dctx,SLBT_ERROR);