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