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.13.0-rc1~468 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9120e619240c698c899a9baea203a52c4bdfd565;p=lttng-tools.git 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 7006a2158..2a20e5a8c 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; }