summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-27 00:29:01 +0200
committermidipix <writeonce@midipix.org>2018-05-21 01:44:56 -0400
commit6a7c0258ae558172eda31c56c9ed21605d02bec0 (patch)
tree2cf4edd67090ec9414b2b1fbce578315a9ce7d2e /src/driver
parent2404cd8761998d454dd7f0e2e276d2a14970f32a (diff)
downloadntux-6a7c0258ae558172eda31c56c9ed21605d02bec0.tar.bz2
ntux-6a7c0258ae558172eda31c56c9ed21605d02bec0.tar.xz
driver: added --cmd support, added 'stat' as an available command.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/ntux_driver_ctx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/driver/ntux_driver_ctx.c b/src/driver/ntux_driver_ctx.c
index 3759ef7..0398d5f 100644
--- a/src/driver/ntux_driver_ctx.c
+++ b/src/driver/ntux_driver_ctx.c
@@ -69,8 +69,9 @@ static int ntux_driver_usage(
char header[512];
snprintf(header,sizeof(header),
- "Usage: %s [options] <file>...\n" "Options:\n",
- program);
+ "Usage: %s [options] ...\n"
+ "Usage: %s [options] --cmd=<command> <arg> <arg> ...\n" "Options:\n",
+ program,program);
argv_usage(stdout,header,optv,arg);
argv_free(meta);
@@ -164,6 +165,11 @@ int ntux_get_driver_ctx(
case TAG_VERSION:
cctx.drvflags |= NTUX_DRIVER_VERSION;
break;
+
+ case TAG_CMD:
+ if (!strcmp(entry->arg,"stat"))
+ cctx.cmd = NTUX_CMD_STAT;
+ break;
}
} else
nunits++;