chiark / gitweb /
nspawn: only pass in slice setting if it is set
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Oct 2013 17:40:21 +0000 (18:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Oct 2013 17:40:21 +0000 (18:40 +0100)
src/nspawn/nspawn.c

index ad0287d..c0f9948 100644 (file)
@@ -1191,7 +1191,7 @@ static int register_machine(void) {
                         "container",
                         (uint32_t) 0,
                         strempty(arg_directory),
-                        1, "Slice", "s", strempty(arg_slice));
+                        !isempty(arg_slice), "Slice", "s", arg_slice);
         if (r < 0) {
                 log_error("Failed to register machine: %s", error.message ? error.message : strerror(-r));
                 return r;