static char *opt_session_name;
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-set-session.1.h>
+;
+#endif
+
enum {
OPT_HELP = 1,
OPT_LIST_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.
*/
list_cmd_options(stdout, long_options);
goto end;
default:
- usage(stderr);
ret = CMD_UNDEFINED;
goto end;
}
opt_session_name = (char *) poptGetArg(pc);
if (opt_session_name == NULL) {
ERR("Missing session name");
- usage(stderr);
ret = CMD_ERROR;
goto end;
}
ret = ret ? ret : LTTNG_ERR_MI_IO_FAIL;
}
- /* Overwrite ret if an error occured during set_session() */
+ /* Overwrite ret if an error occurred during set_session() */
ret = command_ret ? command_ret : ret;
poptFreeContext(pc);