From: Jérémie Galarneau Date: Thu, 8 May 2014 16:12:28 +0000 (-0400) Subject: Fix: Don't report an error if no sessions are found with default options X-Git-Tag: v2.5.0-rc1~52 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d2b6effff5e88183f4dfc630131ab6d1b783318e;p=lttng-tools.git Fix: Don't report an error if no sessions are found with default options Signed-off-by: Jérémie Galarneau Signed-off-by: David Goulet --- diff --git a/src/common/config/config.c b/src/common/config/config.c index 8b34d02f1..df6f6a3f4 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -2544,5 +2544,12 @@ int config_load_session(const char *path, const char *session_name, } end: fini_session_config_validation_ctx(&validation_ctx); + if (ret == -LTTNG_ERR_LOAD_SESSION_NOENT && !session_name && !path) { + /* + * Don't report an error if no sessions are found when called + * without a session_name or a search path. + */ + ret = 0; + } return ret; }