[lttng-dev] [PATCH lttng-tool] Fix: wrong behavior of save command when no session name is provided

David Goulet dgoulet at efficios.com
Tue Jun 17 16:11:42 EDT 2014


Merged! Thanks

David

On 17 Jun (15:59:41), Jonathan Rajotte Julien wrote:
> No session name and no option --all should default to --all.
> 
> Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien at gmail.com>
> ---
>  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 e8a4565..9be7103 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.0.0
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: Digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140617/8180545d/attachment.sig>


More information about the lttng-dev mailing list