From: David Goulet Date: Thu, 2 Feb 2012 16:55:22 +0000 (-0500) Subject: Merge branch 'master' of git://git.lttng.org/lttng-tools X-Git-Tag: v2.0-pre19~3 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=976731c81935b744ae0fdf4044d1e6f7f9c1e0e8;hp=61f82615b76321537fa605313b0057e22588f33c Merge branch 'master' of git://git.lttng.org/lttng-tools --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 3bac86ecd..c0bd30f22 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -480,7 +480,8 @@ static int list_sessions(const char *session_name) continue; } - MSG(" %d) %s (%s)%s", i + 1, sessions[i].name, sessions[i].path, active_string(sessions[i].enabled)); + MSG(" %d) %s (%s)%s", i + 1, sessions[i].name, sessions[i].path, + active_string(sessions[i].enabled)); if (session_found) { break; @@ -490,7 +491,9 @@ static int list_sessions(const char *session_name) free(sessions); if (!session_found && session_name != NULL) { - ERR("Session %s not found", session_name); + ERR("Session '%s' not found", session_name); + ret = CMD_ERROR; + goto error; } if (session_name == NULL) { @@ -601,7 +604,7 @@ int cmd_list(int argc, const char **argv) if (session_name == NULL) { if (!opt_kernel && !opt_userspace) { ret = list_sessions(NULL); - if (ret < 0) { + if (ret != 0) { goto end; } } @@ -620,7 +623,7 @@ int cmd_list(int argc, const char **argv) } else { /* List session attributes */ ret = list_sessions(session_name); - if (ret < 0) { + if (ret != 0) { goto end; } diff --git a/src/common/compat/compat-epoll.c b/src/common/compat/compat-epoll.c index dc1a3b926..77f5b922a 100644 --- a/src/common/compat/compat-epoll.c +++ b/src/common/compat/compat-epoll.c @@ -93,6 +93,8 @@ int compat_epoll_add(struct lttng_poll_event *events, int fd, uint32_t req_event if (ret < 0) { switch (errno) { case EEXIST: + /* If exist, it's OK. */ + goto end; case ENOSPC: case EPERM: /* Print perror and goto end not failing. Show must go on. */