From 8ec5cef55b0a328992210b42f1186a1402b21169 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 26 Sep 2022 14:43:49 +0000 Subject: ntux_cmd_fspath(): initial implementation and driver integration. --- src/skin/ntux_skin_default.c | 2 +- src/skin/ntux_skin_fspath.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/skin/ntux_skin_fspath.c (limited to 'src/skin') diff --git a/src/skin/ntux_skin_default.c b/src/skin/ntux_skin_default.c index 389321e..b7fabc6 100644 --- a/src/skin/ntux_skin_default.c +++ b/src/skin/ntux_skin_default.c @@ -9,7 +9,7 @@ const struct argv_option ntux_default_options[] = { "show usage information [listing %s options only]"}, {"cmd", 0,TAG_CMD,ARGV_OPTARG_REQUIRED,0, - "stat|spawn|strace|chmod|aceit",0, + "stat|spawn|strace|chmod|aceit|fspath",0, "invoke one of the following ntux commands: %s"}, {0,0,0,0,0,0,0,0} diff --git a/src/skin/ntux_skin_fspath.c b/src/skin/ntux_skin_fspath.c new file mode 100644 index 0000000..001d3c8 --- /dev/null +++ b/src/skin/ntux_skin_fspath.c @@ -0,0 +1,32 @@ +#include "ntux_driver_impl.h" +#include "argv/argv.h" + +const struct argv_option ntux_fspath_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]"}, + + {"syntax", 's',TAG_SYNTAX,ARGV_OPTARG_REQUIRED,0, + "relative|absolute|native|driver",0, + "print the path using: " + "root-relative notation (e.g. /bar); " + "root-based absolute notation (e.g. /dev/fs/c/foo/bar); " + "native tool notation (e.g. C:\\foo\\bar); or " + "native driver notation (e.g. \\Device\\Harddisk0\\foo\\bar)"}, + + {"rpath", '\0',TAG_RPATH,ARGV_OPTARG_NONE,0,0,0, + "same as --syntax=relative"}, + + {"apath", '\0',TAG_APATH,ARGV_OPTARG_NONE,0,0,0, + "same as --syntax=absolute"}, + + {"npath", '\0',TAG_NPATH,ARGV_OPTARG_NONE,0,0,0, + "same as --syntax=native"}, + + {"dpath", '\0',TAG_DPATH,ARGV_OPTARG_NONE,0,0,0, + "same as --syntax=driver"}, + + {0,0,0,0,0,0,0,0} +}; -- cgit v1.2.3