fix: if tracing group does not exist, do not report a client error
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Feb 2012 15:41:45 +0000 (10:41 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Feb 2012 15:41:45 +0000 (10:41 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/lib/lttng-ctl/lttng-ctl.c

index dafe085dc9bc40b81f53a35b13fbc6791969492f..c5887fe65ead21a41f637aafa3adc10d60e0eb45 100644 (file)
@@ -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;
        }
 
This page took 0.034388 seconds and 4 git commands to generate.