From 7deda55512cec1a0f039d816b5d8c7371c3fc308 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 22 May 2018 23:49:56 +0000 Subject: driver: added --cmd={spawn|strace} support, support multiple option sets. --- src/skin/ntux_skin_default.c | 4 ++-- src/skin/ntux_skin_spawn.c | 12 ++++++++++++ src/skin/ntux_skin_strace.c | 12 ++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src/skin/ntux_skin_spawn.c create mode 100644 src/skin/ntux_skin_strace.c (limited to 'src/skin') diff --git a/src/skin/ntux_skin_default.c b/src/skin/ntux_skin_default.c index fa4c33d..73a89bf 100644 --- a/src/skin/ntux_skin_default.c +++ b/src/skin/ntux_skin_default.c @@ -8,8 +8,8 @@ const struct argv_option ntux_default_options[] = { {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, "show usage information [listing %s options only]"}, - {"cmd", 0,TAG_CMD,ARGV_OPTARG_REQUIRED,0,"stat",0, - "invoke an internal ntux command"}, + {"cmd", 0,TAG_CMD,ARGV_OPTARG_REQUIRED,0,"stat|spawn|strace",0, + "invoke one of the following ntux commands: %s"}, {0,0,0,0,0,0,0,0} }; diff --git a/src/skin/ntux_skin_spawn.c b/src/skin/ntux_skin_spawn.c new file mode 100644 index 0000000..d7bac9b --- /dev/null +++ b/src/skin/ntux_skin_spawn.c @@ -0,0 +1,12 @@ +#include "ntux_driver_impl.h" +#include "argv/argv.h" + +const struct argv_option ntux_spawn_options[] = { + {"version", 'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0, + "show version information"}, + + {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, + "show usage information [listing %s options only]"}, + + {0,0,0,0,0,0,0,0} +}; diff --git a/src/skin/ntux_skin_strace.c b/src/skin/ntux_skin_strace.c new file mode 100644 index 0000000..643c114 --- /dev/null +++ b/src/skin/ntux_skin_strace.c @@ -0,0 +1,12 @@ +#include "ntux_driver_impl.h" +#include "argv/argv.h" + +const struct argv_option ntux_strace_options[] = { + {"version", 'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0, + "show version information"}, + + {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, + "show usage information [listing %s options only]"}, + + {0,0,0,0,0,0,0,0} +}; -- cgit v1.2.3