X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Futil.c;h=7903ca07b99fe64d493948f579eb9e34f3adbd31;hp=0b0063ee0e6078a48cdec42f053be97c42a7742a;hb=d06dacd0020af7e31ff6089deff339b00ed979e3;hpb=8a2b3c097b5ebd53348700f591e50530a82b5cea diff --git a/src/util.c b/src/util.c index 0b0063ee0..7903ca07b 100644 --- a/src/util.c +++ b/src/util.c @@ -57,6 +57,7 @@ #include "log.h" #include "strv.h" #include "label.h" +#include "exit-status.h" bool streq_ptr(const char *a, const char *b) { @@ -2398,6 +2399,16 @@ bool is_clean_exit(int code, int status) { return false; } +bool is_clean_exit_lsb(int code, int status) { + + if (is_clean_exit(code, status)) + return true; + + return + code == CLD_EXITED && + (status == EXIT_NOTINSTALLED || status == EXIT_NOTCONFIGURED); +} + bool is_device_path(const char *path) { /* Returns true on paths that refer to a device, either in