diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-14 18:28:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-16 15:12:07 +0000 |
commit | 589986012c4b3ab68e299a2eadca18f90080113b (patch) | |
tree | f29a53b04a1950cdddae69344bccb3f0146fa728 /util/argconfig.h | |
parent | Releasing debian version 1.16-4. (diff) | |
download | nvme-cli-589986012c4b3ab68e299a2eadca18f90080113b.tar.xz nvme-cli-589986012c4b3ab68e299a2eadca18f90080113b.zip |
Merging upstream version 2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'util/argconfig.h')
-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; |