lttng: remove usage strings from commands
[lttng-tools.git] / src / bin / lttng / commands / set_session.c
index 14fe9afd8362ee20eaaf2bc5618460af7217d953..4a41d9068a60bae986220e0e2db7f9aea45918f1 100644 (file)
@@ -15,7 +15,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <popt.h>
 #include <stdio.h>
@@ -46,19 +45,6 @@ static struct poptOption long_options[] = {
        {0, 0, 0, 0, 0, 0, 0}
 };
 
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
-       fprintf(ofp, "usage: lttng set-session NAME [OPTIONS]\n");
-       fprintf(ofp, "\n");
-       fprintf(ofp, "Options:\n");
-       fprintf(ofp, "  -h, --help               Show this help\n");
-       fprintf(ofp, "      --list-options       Simple listing of options\n");
-       fprintf(ofp, "\n");
-}
-
 /*
  * Print the necessary mi for a session and name.
  */
@@ -175,13 +161,12 @@ int cmd_set_session(int argc, const char **argv)
        while ((opt = poptGetNextOpt(pc)) != -1) {
                switch (opt) {
                case OPT_HELP:
-                       usage(stdout);
+                       SHOW_HELP();
                        goto end;
                case OPT_LIST_OPTIONS:
                        list_cmd_options(stdout, long_options);
                        goto end;
                default:
-                       usage(stderr);
                        ret = CMD_UNDEFINED;
                        goto end;
                }
@@ -190,7 +175,6 @@ int cmd_set_session(int argc, const char **argv)
        opt_session_name = (char *) poptGetArg(pc);
        if (opt_session_name == NULL) {
                ERR("Missing session name");
-               usage(stderr);
                ret = CMD_ERROR;
                goto end;
        }
This page took 0.023429 seconds and 4 git commands to generate.