Fix: wrong behavior of save command when no session name is provided
authorJonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Tue, 17 Jun 2014 19:59:41 +0000 (15:59 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 17 Jun 2014 20:09:04 +0000 (16:09 -0400)
No session name and no option --all should default to --all.

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/save.c

index e8a4565e9d692492787694f502b5279da8d6c059..9be710326349150a08bd9da5d5999152a777c6ab 100644 (file)
@@ -93,12 +93,9 @@ int cmd_save(int argc, const char **argv)
 
        if (!opt_save_all) {
                session_name = poptGetArg(pc);
-               if (!session_name) {
-                       ERR("A session name must be provided if the \"all\" option is not used.");
-                       ret = CMD_ERROR;
-                       goto end;
+               if (session_name) {
+                       DBG2("Session name: %s", session_name);
                }
-               DBG2("Session name: %s", session_name);
        }
 
        attr = lttng_save_session_attr_create();
This page took 0.025426 seconds and 4 git commands to generate.