]> err.no Git - systemd/commitdiff
socket: rename 'broken' failure result to 'failed-permanent' on order not to introduc...
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Mar 2012 00:29:29 +0000 (01:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Mar 2012 00:29:29 +0000 (01:29 +0100)
src/service.c
src/socket.c
src/socket.h

index 5764f5f8423763345e5a0b511df41f0093fabf2f..babd9cf9a550b4892413855ef22d75d20876218c 100644 (file)
@@ -1436,7 +1436,7 @@ static int service_search_main_pid(Service *s) {
         return 0;
 }
 
-static void service_notify_sockets_dead(Service *s, bool broken) {
+static void service_notify_sockets_dead(Service *s, bool failed_permanent) {
         Iterator i;
         Unit *u;
 
@@ -1449,7 +1449,7 @@ static void service_notify_sockets_dead(Service *s, bool broken) {
 
         SET_FOREACH(u, UNIT(s)->dependencies[UNIT_TRIGGERED_BY], i)
                 if (u->type == UNIT_SOCKET)
-                        socket_notify_service_dead(SOCKET(u), broken);
+                        socket_notify_service_dead(SOCKET(u), failed_permanent);
 
         return;
 }
@@ -2359,7 +2359,7 @@ static int service_start_limit_test(Service *s) {
         }
 
         case SERVICE_START_LIMIT_REBOOT_FORCE:
-                log_warning("%s start request repeated too quickly, force rebooting.", UNIT(s)->id);
+                log_warning("%s start request repeated too quickly, forcibly rebooting.", UNIT(s)->id);
                 UNIT(s)->manager->exit_code = MANAGER_REBOOT;
                 break;
 
index 6bcc1297f0a9e9d29326e6e50bdba2a451884d28..aeedcbd7f3719eb26aaac4e524249769b9557568 100644 (file)
@@ -2038,7 +2038,7 @@ int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds) {
         return 0;
 }
 
-void socket_notify_service_dead(Socket *s, bool broken) {
+void socket_notify_service_dead(Socket *s, bool failed_permanent) {
         assert(s);
 
         /* The service is dead. Dang!
@@ -2047,9 +2047,9 @@ void socket_notify_service_dead(Socket *s, bool broken) {
          * services. */
 
         if (s->state == SOCKET_RUNNING) {
-                log_debug("%s got notified about service death (broken: %s)", UNIT(s)->id, yes_no(broken));
-                if (broken)
-                        socket_enter_stop_pre(s, SOCKET_FAILURE_SERVICE_BROKEN);
+                log_debug("%s got notified about service death (failed permanently: %s)", UNIT(s)->id, yes_no(failed_permanent));
+                if (failed_permanent)
+                        socket_enter_stop_pre(s, SOCKET_FAILURE_SERVICE_FAILED_PERMANENT);
                 else
                         socket_enter_listening(s);
         }
@@ -2160,7 +2160,7 @@ static const char* const socket_result_table[_SOCKET_RESULT_MAX] = {
         [SOCKET_FAILURE_EXIT_CODE] = "exit-code",
         [SOCKET_FAILURE_SIGNAL] = "signal",
         [SOCKET_FAILURE_CORE_DUMP] = "core-dump",
-        [SOCKET_FAILURE_SERVICE_BROKEN] = "service-broken"
+        [SOCKET_FAILURE_SERVICE_FAILED_PERMANENT] = "service-failed-permanent"
 };
 
 DEFINE_STRING_TABLE_LOOKUP(socket_result, SocketResult);
index 1f4f23c96458d96c63d12bbdb34c6896c15e9294..6f2af7cd613b43b48501b0ed00df3c7665d7dc38 100644 (file)
@@ -72,7 +72,7 @@ typedef enum SocketResult {
         SOCKET_FAILURE_EXIT_CODE,
         SOCKET_FAILURE_SIGNAL,
         SOCKET_FAILURE_CORE_DUMP,
-        SOCKET_FAILURE_SERVICE_BROKEN,
+        SOCKET_FAILURE_SERVICE_FAILED_PERMANENT,
         _SOCKET_RESULT_MAX,
         _SOCKET_RESULT_INVALID = -1
 } SocketResult;
@@ -149,7 +149,7 @@ struct Socket {
 int socket_collect_fds(Socket *s, int **fds, unsigned *n_fds);
 
 /* Called from the service when it shut down */
-void socket_notify_service_dead(Socket *s, bool broken);
+void socket_notify_service_dead(Socket *s, bool failed_permanent);
 
 /* Called from the mount code figure out if a mount is a dependency of
  * any of the sockets of this socket */