Fix: Don't report an error if no sessions are found with default options
[lttng-tools.git] / src / common / config / config.c
index 8b34d02f1d54500a339f4cb190d58bba1bf6d4b1..df6f6a3f496b3ad3093065fa77df79e8e7632e8e 100644 (file)
@@ -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;
 }
This page took 0.023058 seconds and 4 git commands to generate.