chiark / gitweb /
util: properly handle empty word suffixes/prefixes in startswith()/endswith()
[elogind.git] / socket.c
index 63346a2bfc7c71630fa6a360d432d7e307e30602..827d7b5e97600f5771a5b7d828782e8da650702d 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -157,7 +157,7 @@ static int socket_load(Unit *u) {
                         if ((r = unit_load_related_unit(u, ".service", (Unit**) &s->service)))
                                 return r;
 
-                        if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(s->service))) < 0)
+                        if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(s->service), true)) < 0)
                                 return r;
                 }
 
@@ -251,7 +251,7 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
                 if (!s->exec_command[c])
                         continue;
 
-                fprintf(f, "%s %s:\n",
+                fprintf(f, "%s-> %s:\n",
                         prefix, socket_exec_command_to_string(c));
 
                 exec_command_dump_list(s->exec_command[c], f, prefix2);
@@ -496,7 +496,7 @@ static void socket_set_state(Socket *s, SocketState state) {
                 socket_close_fds(s);
 
         if (state != old_state)
-                log_debug("%s changed %s  %s",
+                log_debug("%s changed %s -> %s",
                           s->meta.id,
                           socket_state_to_string(old_state),
                           socket_state_to_string(state));