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.11.6~9 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;ds=sidebyside;h=aa1f1a266341650a084a96f05ebe8e2a5da2f801;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 5420490a7..02eddfae4 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -1278,8 +1278,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; }