From b8e397e3e14b958970b7b1917590e971b2573729 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 13 Aug 2019 10:59:52 +0100 Subject: [PATCH] trivial: Downgrade a trivial warning to a debug statement This avoids spamming logs if system seats are set up incorrectly. If the user is using virtual desktops it's highly unlikely they want the session devices managed by colord. --- src/cd-main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cd-main.c b/src/cd-main.c index ee475f8..268d5b2 100644 --- a/src/cd-main.c +++ b/src/cd-main.c @@ -532,17 +532,17 @@ cd_main_get_seat_for_process (guint pid) /* get session the process belongs to */ rc = sd_pid_get_session (pid, &sd_session); - if (rc != 0) { - g_warning ("failed to get session [pid %u]: %s", - pid, strerror (-rc)); + if (rc < 0) { + g_debug ("failed to get session [pid %u]: %s", + pid, strerror (-rc)); goto out; } /* get the seat the session is on */ rc = sd_session_get_seat (sd_session, &sd_seat); - if (rc != 0) { - g_warning ("failed to get seat for session %s [pid %u]: %s", - sd_session, pid, strerror (-rc)); + if (rc < 0) { + g_debug ("failed to get seat for session %s [pid %u]: %s", + sd_session, pid, strerror (-rc)); goto out; } seat = g_strdup (sd_seat); -- 2.21.0