Magellan Linux

Annotation of /trunk/systemd/patches/systemd-221-udevd-suppress-warning-if-we-dont-find-cgroup.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2605 - (hide annotations) (download)
Tue Jun 30 08:21:37 2015 UTC (8 years, 11 months ago) by niro
File size: 1217 byte(s)
-upstream patches for 221
1 niro 2605 From 11b9fb15be96da5644ebf85bbc390fdd2756ade9 Mon Sep 17 00:00:00 2001
2     From: Tom Gundersen <teg@jklm.no>
3     Date: Mon, 22 Jun 2015 16:53:54 +0200
4     Subject: udevd: suppress warning if we don't find cgroup
5    
6     This is expected on non-systemd systems, so just log it at debug level.
7    
8     This fixes issue #309.
9    
10     diff --git a/src/udev/udevd.c b/src/udev/udevd.c
11     index c205f1d..ff15664 100644
12     --- a/src/udev/udevd.c
13     +++ b/src/udev/udevd.c
14     @@ -1672,8 +1672,12 @@ int main(int argc, char *argv[]) {
15     we only do this on systemd systems, and only if we are directly spawned
16     by PID1. otherwise we are not guaranteed to have a dedicated cgroup */
17     r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup);
18     - if (r < 0)
19     - log_warning_errno(r, "failed to get cgroup: %m");
20     + if (r < 0) {
21     + if (r == -ENOENT)
22     + log_debug_errno(r, "did not find dedicated cgroup: %m");
23     + else
24     + log_warning_errno(r, "failed to get cgroup: %m");
25     + }
26     }
27    
28     r = listen_fds(&fd_ctrl, &fd_uevent);
29     --
30     cgit v0.10.2
31