chiark / gitweb /
core: pass Unit into cgroup_context_apply() and use log_unit*()
authorTejun Heo <htejun@fb.com>
Thu, 2 Jun 2016 17:02:49 +0000 (13:02 -0400)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:59 +0000 (10:12 +0200)
commit3b92deb8aee256a1825a151f0b7462e4d3f3f98a
treea08abb2dcc88137d8a0e6b86cdbf9d36118423c5
parent8165a8803d7eb27502d49dc813b8b3c4e60963eb
core: pass Unit into cgroup_context_apply() and use log_unit*()

cgroup_context_apply() and friends take CGroupContext and cgroup path as input
and has no way of getting back to the associated Unit and thus uses raw cgroup
path for logging.  This makes the log messages difficult to track down.
There's no reason to avoid passing in Unit into these functions.  Pass in Unit
and use log_unit*() instead.

While at it, make cgroup_context_apply(), which has no outside users, static.
Also, drop cgroup path from log messages where the path itself isn't too
interesting and can be easily obtained from the unit.
src/core/cgroup.c
src/core/cgroup.h