-struct poptOption convert_long_options[] = {
- /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
- { "begin", 'b', POPT_ARG_STRING, NULL, OPT_BEGIN, NULL, NULL },
- { "clock-cycles", '\0', POPT_ARG_NONE, NULL, OPT_CLOCK_CYCLES, NULL, NULL },
- { "clock-date", '\0', POPT_ARG_NONE, NULL, OPT_CLOCK_DATE, NULL, NULL },
- { "clock-force-correlate", '\0', POPT_ARG_NONE, NULL, OPT_CLOCK_FORCE_CORRELATE, NULL, NULL },
- { "clock-gmt", '\0', POPT_ARG_NONE, NULL, OPT_CLOCK_GMT, NULL, NULL },
- { "clock-offset", '\0', POPT_ARG_STRING, NULL, OPT_CLOCK_OFFSET, NULL, NULL },
- { "clock-offset-ns", '\0', POPT_ARG_STRING, NULL, OPT_CLOCK_OFFSET_NS, NULL, NULL },
- { "clock-seconds", '\0', POPT_ARG_NONE, NULL, OPT_CLOCK_SECONDS, NULL, NULL },
- { "color", '\0', POPT_ARG_STRING, NULL, OPT_COLOR, NULL, NULL },
- { "component", 'c', POPT_ARG_STRING, NULL, OPT_COMPONENT, NULL, NULL },
- { "debug", 'd', POPT_ARG_NONE, NULL, OPT_DEBUG, NULL, NULL },
- { "debug-info-dir", 0, POPT_ARG_STRING, NULL, OPT_DEBUG_INFO_DIR, NULL, NULL },
- { "debug-info-full-path", 0, POPT_ARG_NONE, NULL, OPT_DEBUG_INFO_FULL_PATH, NULL, NULL },
- { "debug-info-target-prefix", 0, POPT_ARG_STRING, NULL, OPT_DEBUG_INFO_TARGET_PREFIX, NULL, NULL },
- { "end", 'e', POPT_ARG_STRING, NULL, OPT_END, NULL, NULL },
- { "fields", 'f', POPT_ARG_STRING, NULL, OPT_FIELDS, NULL, NULL },
- { "help", 'h', POPT_ARG_NONE, NULL, OPT_HELP, NULL, NULL },
- { "input-format", 'i', POPT_ARG_STRING, NULL, OPT_INPUT_FORMAT, NULL, NULL },
- { "log-level", 'l', POPT_ARG_STRING, NULL, OPT_LOG_LEVEL, NULL, NULL },
- { "name", '\0', POPT_ARG_STRING, NULL, OPT_NAME, NULL, NULL },
- { "names", 'n', POPT_ARG_STRING, NULL, OPT_NAMES, NULL, NULL },
- { "debug-info", '\0', POPT_ARG_NONE, NULL, OPT_DEBUG_INFO, NULL, NULL },
- { "no-delta", '\0', POPT_ARG_NONE, NULL, OPT_NO_DELTA, NULL, NULL },
- { "omit-home-plugin-path", '\0', POPT_ARG_NONE, NULL, OPT_OMIT_HOME_PLUGIN_PATH, NULL, NULL },
- { "omit-system-plugin-path", '\0', POPT_ARG_NONE, NULL, OPT_OMIT_SYSTEM_PLUGIN_PATH, NULL, NULL },
- { "output", 'w', POPT_ARG_STRING, NULL, OPT_OUTPUT, NULL, NULL },
- { "output-format", 'o', POPT_ARG_STRING, NULL, OPT_OUTPUT_FORMAT, NULL, NULL },
- { "params", 'p', POPT_ARG_STRING, NULL, OPT_PARAMS, NULL, NULL },
- { "path", 'P', POPT_ARG_STRING, NULL, OPT_PATH, NULL, NULL },
- { "plugin-path", '\0', POPT_ARG_STRING, NULL, OPT_PLUGIN_PATH, NULL, NULL },
- { "retry-duration", '\0', POPT_ARG_STRING, NULL, OPT_RETRY_DURATION, NULL, NULL },
- { "run-args", '\0', POPT_ARG_NONE, NULL, OPT_RUN_ARGS, NULL, NULL },
- { "run-args-0", '\0', POPT_ARG_NONE, NULL, OPT_RUN_ARGS_0, NULL, NULL },
- { "stream-intersection", '\0', POPT_ARG_NONE, NULL, OPT_STREAM_INTERSECTION, NULL, NULL },
- { "timerange", '\0', POPT_ARG_STRING, NULL, OPT_TIMERANGE, NULL, NULL },
- { "url", 'u', POPT_ARG_STRING, NULL, OPT_URL, NULL, NULL },
- { "verbose", 'v', POPT_ARG_NONE, NULL, OPT_VERBOSE, NULL, NULL },
- { NULL, 0, '\0', NULL, 0, NULL, NULL },
+const struct bt_argpar_opt_descr convert_options[] = {
+ /* id, short_name, long_name, with_arg */
+ { OPT_BEGIN, 'b', "begin", true },
+ { OPT_CLOCK_CYCLES, '\0', "clock-cycles", false },
+ { OPT_CLOCK_DATE, '\0', "clock-date", false },
+ { OPT_CLOCK_FORCE_CORRELATE, '\0', "clock-force-correlate", false },
+ { OPT_CLOCK_GMT, '\0', "clock-gmt", false },
+ { OPT_CLOCK_OFFSET, '\0', "clock-offset", true },
+ { OPT_CLOCK_OFFSET_NS, '\0', "clock-offset-ns", true },
+ { OPT_CLOCK_SECONDS, '\0', "clock-seconds", false },
+ { OPT_COLOR, '\0', "color", true },
+ { OPT_COMPONENT, 'c', "component", true },
+ { OPT_DEBUG, 'd', "debug", false },
+ { OPT_DEBUG_INFO_DIR, '\0', "debug-info-dir", true },
+ { OPT_DEBUG_INFO_FULL_PATH, '\0', "debug-info-full-path", false },
+ { OPT_DEBUG_INFO_TARGET_PREFIX, '\0', "debug-info-target-prefix", true },
+ { OPT_END, 'e', "end", true },
+ { OPT_FIELDS, 'f', "fields", true },
+ { OPT_HELP, 'h', "help", false },
+ { OPT_INPUT_FORMAT, 'i', "input-format", true },
+ { OPT_LOG_LEVEL, 'l', "log-level", true },
+ { OPT_NAMES, 'n', "names", true },
+ { OPT_DEBUG_INFO, '\0', "debug-info", false },
+ { OPT_NO_DELTA, '\0', "no-delta", false },
+ { OPT_OMIT_HOME_PLUGIN_PATH, '\0', "omit-home-plugin-path", false },
+ { OPT_OMIT_SYSTEM_PLUGIN_PATH, '\0', "omit-system-plugin-path", false },
+ { OPT_OUTPUT, 'w', "output", true },
+ { OPT_OUTPUT_FORMAT, 'o', "output-format", true },
+ { OPT_PARAMS, 'p', "params", true },
+ { OPT_PLUGIN_PATH, '\0', "plugin-path", true },
+ { OPT_RETRY_DURATION, '\0', "retry-duration", true },
+ { OPT_RUN_ARGS, '\0', "run-args", false },
+ { OPT_RUN_ARGS_0, '\0', "run-args-0", false },
+ { OPT_STREAM_INTERSECTION, '\0', "stream-intersection", false },
+ { OPT_TIMERANGE, '\0', "timerange", true },
+ { OPT_VERBOSE, 'v', "verbose", false },
+ BT_ARGPAR_OPT_DESCR_SENTINEL