From 6f41153880f561e092fb7701a2db0facf6b6ffd9 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 10 Jun 2021 08:31:23 +0000 Subject: driver: added --dumpmachine support. --- src/driver/slbt_amain.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/driver/slbt_amain.c') 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); -- cgit v1.2.3