diff options
Diffstat (limited to 'src/rc-local-generator/rc-local-generator.c')
-rw-r--r-- | src/rc-local-generator/rc-local-generator.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c index d4e6ba4bf9..618bbe428d 100644 --- a/src/rc-local-generator/rc-local-generator.c +++ b/src/rc-local-generator/rc-local-generator.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -24,9 +22,11 @@ #include <stdio.h> #include <unistd.h> +#include "alloc-util.h" #include "log.h" -#include "util.h" #include "mkdir.h" +#include "string-util.h" +#include "util.h" #ifndef RC_LOCAL_SCRIPT_PATH_START #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.d/rc.local" @@ -36,7 +36,7 @@ #define RC_LOCAL_SCRIPT_PATH_STOP "/sbin/halt.local" #endif -const char *arg_dest = "/tmp"; +static const char *arg_dest = "/tmp"; static int add_symlink(const char *service, const char *where) { _cleanup_free_ char *from = NULL, *to = NULL; @@ -60,8 +60,7 @@ static int add_symlink(const char *service, const char *where) { if (errno == EEXIST) return 0; - log_error_errno(errno, "Failed to create symlink %s: %m", to); - return -errno; + return log_error_errno(errno, "Failed to create symlink %s: %m", to); } return 1; |