daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From d5e2897030849371bc976ecb8de3ca2fbf16b6bb Mon Sep 17 00:00:00 2001
9fc0f6
From: Lennart Poettering <lennart@poettering.net>
9fc0f6
Date: Wed, 30 Oct 2013 18:40:21 +0100
9fc0f6
Subject: [PATCH] nspawn: only pass in slice setting if it is set
9fc0f6
9fc0f6
---
9fc0f6
 src/nspawn/nspawn.c | 2 +-
9fc0f6
 1 file changed, 1 insertion(+), 1 deletion(-)
9fc0f6
9fc0f6
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
9fc0f6
index eb9605c..9616dbf 100644
9fc0f6
--- a/src/nspawn/nspawn.c
9fc0f6
+++ b/src/nspawn/nspawn.c
9fc0f6
@@ -1202,7 +1202,7 @@ static int register_machine(void) {
9fc0f6
                         "container",
9fc0f6
                         (uint32_t) 0,
9fc0f6
                         strempty(arg_directory),
9fc0f6
-                        1, "Slice", "s", strempty(arg_slice));
9fc0f6
+                        !isempty(arg_slice), "Slice", "s", arg_slice);
9fc0f6
         if (r < 0) {
9fc0f6
                 log_error("Failed to register machine: %s", error.message ? error.message : strerror(-r));
9fc0f6
                 return r;