summaryrefslogtreecommitdiff
path: root/src/core/swap.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-08 15:53:56 +0200
committerDaniel Mack <github@zonque.org>2015-09-08 15:53:56 +0200
commitda323858ef34a0216aa96f4089810053c90f09ce (patch)
tree6255edf3ad93f2ce0cee28856ec3de90915caccd /src/core/swap.c
parent4211d5bd135ae4c43bd2012ae5f327b1cc1596c0 (diff)
parent75f86906c52735c98dc0aa7e24b773edb42ee814 (diff)
Merge pull request #1190 from poettering/rework-virt
basic: rework virtualization detection API
Diffstat (limited to 'src/core/swap.c')
-rw-r--r--src/core/swap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/swap.c b/src/core/swap.c
index 4f3ddc9f04..2f462e339d 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -215,7 +215,7 @@ static int swap_add_default_dependencies(Swap *s) {
if (UNIT(s)->manager->running_as != MANAGER_SYSTEM)
return 0;
- if (detect_container(NULL) > 0)
+ if (detect_container() > 0)
return 0;
return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
@@ -824,7 +824,7 @@ static int swap_start(Unit *u) {
assert(s->state == SWAP_DEAD || s->state == SWAP_FAILED);
- if (detect_container(NULL) > 0)
+ if (detect_container() > 0)
return -EPERM;
/* If there's a job for another swap unit for the same node
@@ -857,7 +857,7 @@ static int swap_stop(Unit *u) {
s->state == SWAP_ACTIVATING_DONE ||
s->state == SWAP_ACTIVE);
- if (detect_container(NULL) > 0)
+ if (detect_container() > 0)
return -EPERM;
swap_enter_deactivating(s);
@@ -1404,7 +1404,7 @@ static bool swap_supported(void) {
if (supported < 0)
supported =
access("/proc/swaps", F_OK) >= 0 &&
- detect_container(NULL) <= 0;
+ detect_container() <= 0;
return supported;
}