chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service/systemctl: don't consider LSB exit codes 5 and 6 as failure, and decode exit...
[elogind.git]
/
src
/
util.c
diff --git
a/src/util.c
b/src/util.c
index 0b0063ee0e6078a48cdec42f053be97c42a7742a..7903ca07b99fe64d493948f579eb9e34f3adbd31 100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-57,6
+57,7
@@
#include "log.h"
#include "strv.h"
#include "label.h"
#include "log.h"
#include "strv.h"
#include "label.h"
+#include "exit-status.h"
bool streq_ptr(const char *a, const char *b) {
bool streq_ptr(const char *a, const char *b) {
@@
-2398,6
+2399,16
@@
bool is_clean_exit(int code, int status) {
return false;
}
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
bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in