chiark / gitweb /
shared: add formats-util.h
[elogind.git] / src / shared / exit-status.c
index 942ac86128be814a384be4801d1dc3c77df938b9..57022c5b8aebd2b523df640f801683548acad59e 100644 (file)
@@ -20,7 +20,6 @@
 ***/
 
 #include <stdlib.h>
-#include <sys/wait.h>
 
 #include "exit-status.h"
 #include "set.h"
@@ -148,6 +147,9 @@ const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) {
 
                 case EXIT_MAKE_STARTER:
                         return "MAKE_STARTER";
+
+                case EXIT_BUS_ENDPOINT:
+                        return "BUS_ENDPOINT";
                 }
         }
 
@@ -216,3 +218,10 @@ void exit_status_set_free(ExitStatusSet *x) {
         set_free(x->signal);
         x->status = x->signal = NULL;
 }
+
+bool exit_status_set_is_empty(ExitStatusSet *x) {
+        if (!x)
+                return true;
+
+        return set_isempty(x->status) && set_isempty(x->signal);
+}