SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / src / bin / lttng / utils.c
index 28b007b2402889d8782473033eee8119258ebc73..d9fd99ad55e11d8a51a52cb9c2cc4eafea861990 100644 (file)
@@ -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
This page took 0.034063 seconds and 5 git commands to generate.