X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Futils.c;h=680d24134cf49d6d58ab6c43cdb4784ed6d2fe04;hp=e88166a438a06f98177d7a722ce5561b111b0617;hb=refs%2Fheads%2Fsow-2019-0002-rev1;hpb=25357057de5ae4dd2a572e8f9b893c1b90cbd60a diff --git a/src/bin/lttng/utils.c b/src/bin/lttng/utils.c index e88166a43..680d24134 100644 --- a/src/bin/lttng/utils.c +++ b/src/bin/lttng/utils.c @@ -128,6 +128,25 @@ void list_cmd_options(FILE *ofp, struct poptOption *options) } } +/* + * Same as list_cmd_options, but for options specified for argpar. + */ +void list_cmd_options_argpar(FILE *ofp, const struct argpar_opt_descr *options) +{ + int i; + const struct argpar_opt_descr *option = NULL; + + for (i = 0; options[i].long_name != NULL; i++) { + option = &options[i]; + + fprintf(ofp, "--%s\n", option->long_name); + + if (isprint(option->short_name)) { + fprintf(ofp, "-%c\n", option->short_name); + } + } +} + /* * fls: returns the position of the most significant bit. * Returns 0 if no bit is set, else returns the position of the most