From: David Goulet Date: Wed, 26 Mar 2014 15:31:23 +0000 (-0400) Subject: Fix: allow loading session file with -i option X-Git-Tag: v2.5.0-rc1~85 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=732b768a5e0287cc8bb2a6b3f61c127874fc3d7a;p=lttng-tools.git Fix: allow loading session file with -i option Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/load.c b/src/bin/lttng/commands/load.c index 711ac0421..e732baa80 100644 --- a/src/bin/lttng/commands/load.c +++ b/src/bin/lttng/commands/load.c @@ -97,12 +97,9 @@ int cmd_load(int argc, const char **argv) if (!opt_load_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("Loading session name: %s", session_name); } - DBG2("Loading session name: %s", session_name); } ret = config_load_session(opt_input_path, session_name, opt_force); @@ -112,8 +109,10 @@ int cmd_load(int argc, const char **argv) } else { if (opt_load_all) { MSG("All sessions have been loaded successfully"); - } else { + } else if (session_name) { MSG("Session %s has been loaded successfully", session_name); + } else { + MSG("Session has been loaded successfully"); } } end: