X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconfig%2Fconfig.c;h=0e9e1bdc722661c21fb4172b27ba49a593b742ae;hp=722904772316c0fc0b48f548817a472e051247a1;hb=1114378362fe014288ccaab1d1fed52f7b5703f8;hpb=7f63e090725a1ef24e02a849190c4cfc70bba777 diff --git a/src/common/config/config.c b/src/common/config/config.c index 722904772..0e9e1bdc7 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -2342,9 +2342,15 @@ int load_session_from_path(const char *path, const char *session_name, directory = opendir(path); if (!directory) { - if (errno != ENOTDIR) { + switch (errno) { + case ENOTDIR: ret = -LTTNG_ERR_LOAD_IO_FAIL; goto end; + case ENOENT: + ret = -LTTNG_ERR_LOAD_SESSION_NOENT; + goto end; + default: + break; } } if (directory) {