[lttng-dev] [PATCH lttng-tools] Fix: Don't report an error if no sessions are found with default options

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu May 8 12:12:28 EDT 2014


Signed-off-by: Jérémie Galarneau <jeremie.galarneau at efficios.com>
---
 src/common/config/config.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/common/config/config.c b/src/common/config/config.c
index 8b34d02..df6f6a3 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;
 }
-- 
1.9.2




More information about the lttng-dev mailing list