chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dbus: suppress duplicate message when reusing bus for system and session
[elogind.git]
/
src
/
unit.c
diff --git
a/src/unit.c
b/src/unit.c
index 18faae22e47c48b98bcbb9918e26014f354c1400..b362fd3b41957385e7e106f2a10bc98e45bc7bce 100644
(file)
--- a/
src/unit.c
+++ b/
src/unit.c
@@
-39,6
+39,7
@@
#include "specifier.h"
#include "dbus-unit.h"
#include "special.h"
#include "specifier.h"
#include "dbus-unit.h"
#include "special.h"
+#include "cgroup-util.h"
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,
@@
-1144,14
+1145,14
@@
int unit_watch_pid(Unit *u, pid_t pid) {
/* Watch a specific PID. We only support one unit watching
* each PID for now. */
/* Watch a specific PID. We only support one unit watching
* each PID for now. */
- return hashmap_put(u->meta.manager->watch_pids,
UINT32
_TO_PTR(pid), u);
+ return hashmap_put(u->meta.manager->watch_pids,
LONG
_TO_PTR(pid), u);
}
void unit_unwatch_pid(Unit *u, pid_t pid) {
assert(u);
assert(pid >= 1);
}
void unit_unwatch_pid(Unit *u, pid_t pid) {
assert(u);
assert(pid >= 1);
- hashmap_remove_value(u->meta.manager->watch_pids,
UINT32
_TO_PTR(pid), u);
+ hashmap_remove_value(u->meta.manager->watch_pids,
LONG
_TO_PTR(pid), u);
}
int unit_watch_timer(Unit *u, usec_t delay, Watch *w) {
}
int unit_watch_timer(Unit *u, usec_t delay, Watch *w) {
@@
-1598,7
+1599,7
@@
int unit_add_cgroup_from_text(Unit *u, const char *name) {
if (n > 0)
controller = strndup(name, n);
else
if (n > 0)
controller = strndup(name, n);
else
- controller = strdup(
u->meta.manager->cgroup_controller
);
+ controller = strdup(
SYSTEMD_CGROUP_CONTROLLER
);
if (!controller) {
r = -ENOMEM;
if (!controller) {
r = -ENOMEM;
@@
-1647,7
+1648,7
@@
int unit_add_default_cgroup(Unit *u) {
if (!(b = new0(CGroupBonding, 1)))
return -ENOMEM;
if (!(b = new0(CGroupBonding, 1)))
return -ENOMEM;
- if (!(b->controller = strdup(
u->meta.manager->cgroup_controller
)))
+ if (!(b->controller = strdup(
SYSTEMD_CGROUP_CONTROLLER
)))
goto fail;
if (!(b->path = default_cgroup_path(u)))
goto fail;
if (!(b->path = default_cgroup_path(u)))
@@
-1672,7
+1673,7
@@
fail:
CGroupBonding* unit_get_default_cgroup(Unit *u) {
assert(u);
CGroupBonding* unit_get_default_cgroup(Unit *u) {
assert(u);
- return cgroup_bonding_find_list(u->meta.cgroup_bondings,
u->meta.manager->cgroup_controller
);
+ return cgroup_bonding_find_list(u->meta.cgroup_bondings,
SYSTEMD_CGROUP_CONTROLLER
);
}
int unit_load_related_unit(Unit *u, const char *type, Unit **_found) {
}
int unit_load_related_unit(Unit *u, const char *type, Unit **_found) {