summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/service.c16
-rw-r--r--src/core/special.h3
2 files changed, 8 insertions, 11 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 017d292a8b..ebd0baea89 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -322,7 +322,8 @@ static void service_done(Unit *u) {
static char *sysv_translate_name(const char *name) {
char *r;
- if (!(r = new(char, strlen(name) + sizeof(".service"))))
+ r = new(char, strlen(name) + sizeof(".service"));
+ if (!r)
return NULL;
if (endswith(name, ".sh"))
@@ -348,16 +349,12 @@ static int sysv_translate_facility(const char *name, const char *filename, char
static const char * const table[] = {
/* LSB defined facilities */
- "local_fs", SPECIAL_LOCAL_FS_TARGET,
- /* Due to unfortunate name selection in Mandriva,
- * $network is provided by network-up which is ordered
- * after network which actually starts interfaces.
- * To break the loop, just ignore it */
+ "local_fs", NULL,
"network", SPECIAL_NETWORK_TARGET,
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
- "syslog", SPECIAL_SYSLOG_TARGET,
+ "syslog", NULL,
"time", SPECIAL_TIME_SYNC_TARGET,
};
@@ -378,8 +375,9 @@ static int sysv_translate_facility(const char *name, const char *filename, char
if (!table[i+1])
return 0;
- if (!(r = strdup(table[i+1])))
- return -ENOMEM;
+ r = strdup(table[i+1]);
+ if (!r)
+ return log_oom();
goto finish;
}
diff --git a/src/core/special.h b/src/core/special.h
index 626e816922..99c0e1222e 100644
--- a/src/core/special.h
+++ b/src/core/special.h
@@ -46,7 +46,7 @@
/* Early boot targets */
#define SPECIAL_SYSINIT_TARGET "sysinit.target"
#define SPECIAL_SOCKETS_TARGET "sockets.target"
-#define SPECIAL_LOCAL_FS_TARGET "local-fs.target" /* LSB's $local_fs */
+#define SPECIAL_LOCAL_FS_TARGET "local-fs.target"
#define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target"
#define SPECIAL_REMOTE_FS_TARGET "remote-fs.target" /* LSB's $remote_fs */
#define SPECIAL_REMOTE_FS_PRE_TARGET "remote-fs-pre.target"
@@ -57,7 +57,6 @@
#define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network */
#define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named */
#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
-#define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog */
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
/*