From fe7a6da8c5a95064c7e7117ca9362c84be0cb2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 28 Nov 2019 09:13:45 +0100 Subject: [PATCH] core: use SPECIAL_DEFAULT_TARGET more --- src/run-generator/run-generator.c | 3 ++- src/sulogin-shell/sulogin-shell.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/run-generator/run-generator.c b/src/run-generator/run-generator.c index 7d6c1109125..a149b9c9c29 100644 --- a/src/run-generator/run-generator.c +++ b/src/run-generator/run-generator.c @@ -9,6 +9,7 @@ #include "generator.h" #include "mkdir.h" #include "proc-cmdline.h" +#include "special.h" #include "specifier.h" #include "strv.h" @@ -116,7 +117,7 @@ static int generate(void) { return log_error_errno(r, "Failed to create unit file %s: %m", p); /* And now redirect default.target to our new target */ - p = strjoina(arg_dest, "/default.target"); + p = strjoina(arg_dest, "/" SPECIAL_DEFAULT_TARGET); if (symlink("kernel-command-line.target", p) < 0) return log_error_errno(errno, "Failed to link unit file kernel-command-line.target → %s: %m", p); diff --git a/src/sulogin-shell/sulogin-shell.c b/src/sulogin-shell/sulogin-shell.c index 6d65efbb9ea..9f90981e718 100644 --- a/src/sulogin-shell/sulogin-shell.c +++ b/src/sulogin-shell/sulogin-shell.c @@ -14,6 +14,7 @@ #include "process-util.h" #include "sd-bus.h" #include "signal-util.h" +#include "special.h" static int reload_manager(sd_bus *bus) { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; @@ -57,7 +58,7 @@ static int start_default_target(sd_bus *bus) { "StartUnit", &error, NULL, - "ss", "default.target", "isolate"); + "ss", SPECIAL_DEFAULT_TARGET, "isolate"); if (r < 0) return log_error_errno(r, "Failed to start default target: %s", bus_error_message(&error, r));