#include <assert.h>
#include <common/mi-lttng.h>
-#include <common/config/config.h>
+#include <common/config/session-config.h>
#include "../command.h"
{0, 0, 0, 0, 0, 0, 0}
};
-/*
- * usage
- */
-static void usage(FILE *ofp)
-{
- fprintf(ofp, "usage: lttng load [OPTIONS] [SESSION]\n");
- fprintf(ofp, "\n");
- fprintf(ofp, "Options:\n");
- fprintf(ofp, " -h, --help Show this help\n");
- fprintf(ofp, " -a, --all Load all sessions (default)\n");
- fprintf(ofp, " -i, --input-path PATH Input path of the session file(s).\n");
- fprintf(ofp, " If a directory, load all files in it\n");
- fprintf(ofp, " else try to load the given file.\n");
- fprintf(ofp, " -f, --force Override existing session(s).\n");
- fprintf(ofp, " This will destroy existing session(s)\n");
- fprintf(ofp, " before creating new one(s).\n");
-}
-
static int mi_partial_session(const char *session_name)
{
int ret;
while ((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
case OPT_HELP:
- usage(stdout);
+ SHOW_HELP();
goto end;
case OPT_ALL:
opt_load_all = 1;
opt_force = 1;
break;
default:
- usage(stderr);
ret = CMD_UNDEFINED;
goto end;
}