From: Mathieu Desnoyers Date: Thu, 23 Feb 2012 15:41:45 +0000 (-0500) Subject: fix: if tracing group does not exist, do not report a client error X-Git-Tag: v2.0.0-rc2~29 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e66c1d2c3e5dd979cab6afb4e5de525c60e18617;p=lttng-tools.git fix: if tracing group does not exist, do not report a client error Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index dafe085dc..c5887fe65 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -138,11 +138,8 @@ static int check_tracing_group(const char *grp_name) /* Get GID of group 'tracing' */ grp_tracing = getgrnam(grp_name); - if (grp_tracing == NULL) { - /* NULL means not found also. getgrnam(3) */ - if (errno != 0) { - perror("getgrnam"); - } + if (!grp_tracing) { + /* If grp_tracing is NULL, the group does not exist. */ goto end; }