Standardize lttng command line usage text
[lttng-tools.git] / src / bin / lttng / commands / destroy.c
index 7b7ea0e8028cec3f15e160f4f2c374079982fc5f..fea96f1757907178ea8e89b7ee6a21bdd18c27be 100644 (file)
@@ -49,11 +49,12 @@ static struct poptOption long_options[] = {
  */
 static void usage(FILE *ofp)
 {
-       fprintf(ofp, "usage: lttng destroy [options] [NAME]\n");
+       fprintf(ofp, "usage: lttng destroy [NAME] [OPTIONS]\n");
        fprintf(ofp, "\n");
        fprintf(ofp, "Where NAME is an optional session name. If not specified, lttng will\n");
        fprintf(ofp, "get it from the configuration directory (.lttng).\n");
        fprintf(ofp, "\n");
+       fprintf(ofp, "Options:\n");
        fprintf(ofp, "  -h, --help           Show this help\n");
        fprintf(ofp, "  -a, --all            Destroy all sessions\n");
        fprintf(ofp, "      --list-options   Simple listing of options\n");
@@ -113,21 +114,6 @@ error:
        return ret;
 }
 
-/*
- * get_default_session_name
- *
- * Returns the default sessions name, if any
- */
-static int get_default_session_name(char **name)
-{
-       char *session_name = get_session_name();
-       if (session_name == NULL) {
-               return CMD_ERROR;
-       }
-       *name = session_name;
-       return CMD_SUCCESS;
-}
-
 /*
  * The 'destroy <options>' first level command
  */
This page took 0.024415 seconds and 4 git commands to generate.