summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/ntux_driver_ctx.c10
-rw-r--r--src/internal/ntux_driver_impl.h1
-rw-r--r--src/skin/ntux_skin_default.c3
3 files changed, 12 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++;
diff --git a/src/internal/ntux_driver_impl.h b/src/internal/ntux_driver_impl.h
index 822f131..6c635de 100644
--- a/src/internal/ntux_driver_impl.h
+++ b/src/internal/ntux_driver_impl.h
@@ -19,6 +19,7 @@ extern const ntapi_vtbl * ntux_ntapi;
enum app_tags {
TAG_HELP,
TAG_VERSION,
+ TAG_CMD,
};
struct ntux_driver_ctx_impl {
diff --git a/src/skin/ntux_skin_default.c b/src/skin/ntux_skin_default.c
index 7bb0045..fa4c33d 100644
--- a/src/skin/ntux_skin_default.c
+++ b/src/skin/ntux_skin_default.c
@@ -8,5 +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"},
+
{0,0,0,0,0,0,0,0}
};