diff options
Diffstat (limited to 'tools/lib/subcmd/parse-options.h')
-rw-r--r-- | tools/lib/subcmd/parse-options.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lib/subcmd/parse-options.h b/tools/lib/subcmd/parse-options.h index 8866ac438b34..11c3be3bcce7 100644 --- a/tools/lib/subcmd/parse-options.h +++ b/tools/lib/subcmd/parse-options.h | |||
@@ -137,6 +137,11 @@ struct option { | |||
137 | { .type = OPTION_STRING, .short_name = (s), .long_name = (l), \ | 137 | { .type = OPTION_STRING, .short_name = (s), .long_name = (l), \ |
138 | .value = check_vtype(v, const char **), (a), .help = (h), \ | 138 | .value = check_vtype(v, const char **), (a), .help = (h), \ |
139 | .flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d) } | 139 | .flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d) } |
140 | #define OPT_STRING_OPTARG_SET(s, l, v, os, a, h, d) \ | ||
141 | { .type = OPTION_STRING, .short_name = (s), .long_name = (l), \ | ||
142 | .value = check_vtype(v, const char **), (a), .help = (h), \ | ||
143 | .flags = PARSE_OPT_OPTARG, .defval = (intptr_t)(d), \ | ||
144 | .set = check_vtype(os, bool *)} | ||
140 | #define OPT_STRING_NOEMPTY(s, l, v, a, h) { .type = OPTION_STRING, .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), (a), .help = (h), .flags = PARSE_OPT_NOEMPTY} | 145 | #define OPT_STRING_NOEMPTY(s, l, v, a, h) { .type = OPTION_STRING, .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), (a), .help = (h), .flags = PARSE_OPT_NOEMPTY} |
141 | #define OPT_DATE(s, l, v, h) \ | 146 | #define OPT_DATE(s, l, v, h) \ |
142 | { .type = OPTION_CALLBACK, .short_name = (s), .long_name = (l), .value = (v), .argh = "time", .help = (h), .callback = parse_opt_approxidate_cb } | 147 | { .type = OPTION_CALLBACK, .short_name = (s), .long_name = (l), .value = (v), .argh = "time", .help = (h), .callback = parse_opt_approxidate_cb } |