From 59b41aa2b4d4f74cefb898c9a45e82194ee7ff15 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Julien Date: Tue, 17 Jun 2014 15:59:41 -0400 Subject: [PATCH] Fix: wrong behavior of save command when no session name is provided No session name and no option --all should default to --all. Signed-off-by: Jonathan Rajotte Julien Signed-off-by: David Goulet --- src/bin/lttng/commands/save.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bin/lttng/commands/save.c b/src/bin/lttng/commands/save.c index e8a4565e9..9be710326 100644 --- a/src/bin/lttng/commands/save.c +++ b/src/bin/lttng/commands/save.c @@ -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(); -- 2.34.1