From: Jérémie Galarneau Date: Tue, 15 Sep 2020 20:22:14 +0000 (-0400) Subject: Fix: PERROR spam when `tracing` group does not exist X-Git-Tag: v2.12.3~14 X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=8be77cde23f9c882bc53d674aeffa171dc298e58 Fix: PERROR spam when `tracing` group does not exist The session daemon prints a PERROR on launch when the tracing group does not exist. This should not occur when the group simply does not exist as this is not an error. In that case (ESRCH), a DBG statement is sufficient. Signed-off-by: Jérémie Galarneau Change-Id: I3ade29071a8f4e9fe2eb56bf05ff4150b70fd463 --- diff --git a/src/common/utils.c b/src/common/utils.c index 2f587bc7c..45aeddcf6 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -1274,8 +1274,14 @@ int utils_get_group_id(const char *name, bool warn, gid_t *gid) } } if (ret) { - PERROR("Failed to get group file entry for group name \"%s\"", - name); + if (ret == ESRCH) { + DBG("Could not find group file entry for group name '%s'", + name); + } else { + PERROR("Failed to get group file entry for group name '%s'", + name); + } + ret = -1; goto error; }