Fix: bad errno handling in load session from path
[lttng-tools.git] / src / bin / lttng / commands / load.c
index 4d38c792b82cc4e9ffe69253b04457410906eb9a..711ac04216383c42ef44e887a8472f6f6022ded6 100644 (file)
@@ -55,10 +55,14 @@ 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     Input path of the session configuration(s)\n");
-       fprintf(ofp, "  -f, --force          Override existing session configuration(s)\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");
 }
 
 /*
@@ -105,6 +109,12 @@ int cmd_load(int argc, const char **argv)
        if (ret) {
                ERR("%s", lttng_strerror(ret));
                ret = -ret;
+       } else {
+               if (opt_load_all) {
+                       MSG("All sessions have been loaded successfully");
+               } else {
+                       MSG("Session %s has been loaded successfully", session_name);
+               }
        }
 end:
        poptFreeContext(pc);
This page took 0.023177 seconds and 4 git commands to generate.