diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-14 18:27:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-16 15:11:56 +0000 |
commit | 6197903bd42478987516bc4cc3f0769488a37065 (patch) | |
tree | 508d399340039960289dd1d96696db7c56c22321 /util/argconfig.h | |
parent | Adding upstream version 1.16. (diff) | |
download | nvme-cli-6197903bd42478987516bc4cc3f0769488a37065.tar.xz nvme-cli-6197903bd42478987516bc4cc3f0769488a37065.zip |
Adding upstream version 2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | util/argconfig.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/argconfig.h b/util/argconfig.h index 3147277..a11334b 100644 --- a/util/argconfig.h +++ b/util/argconfig.h @@ -38,7 +38,7 @@ #include <stdarg.h> enum argconfig_types { - CFG_NONE, + CFG_FLAG, CFG_STRING, CFG_INT, CFG_SIZE, @@ -65,7 +65,7 @@ enum argconfig_types { #define OPT_END() { NULL } #define OPT_FLAG(l, s, v, d) \ - {l, s, NULL, CFG_NONE, v, no_argument, d} + {l, s, NULL, CFG_FLAG, v, no_argument, d} #define OPT_SUFFIX(l, s, v, d) \ {l, s, "IONUM", CFG_LONG_SUFFIX, v, required_argument, d} @@ -91,12 +91,16 @@ enum argconfig_types { #define OPT_SHRT(l, s, v, d) \ {l, s, "NUM", CFG_SHORT, v, required_argument, d} +#define OPT_INCR(l, s, v, d) \ + {l, s, "NUM", CFG_INCREMENT, v, no_argument, d} + #define OPT_STRING(l, s, m, v, d) \ {l, s, m, CFG_STRING, v, required_argument, d} #define OPT_FMT(l, s, v, d) OPT_STRING(l, s, "FMT", v, d) #define OPT_FILE(l, s, v, d) OPT_STRING(l, s, "FILE", v, d) #define OPT_LIST(l, s, v, d) OPT_STRING(l, s, "LIST", v, d) +#define OPT_STR(l, s, v, d) OPT_STRING(l, s, "STRING", v, d) struct argconfig_commandline_options { const char *option; |