X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=util.c;h=5e3654d1d1ff383d96ec5de86381e85ed8a41d37;hp=5df811d038df60414a221b9d2a2f9d40a1545cca;hb=cb8a8f78a11cedb8cba1abfa9a63b0d3ea8eef93;hpb=843d2643849a1ec63034012c8fe50bfaad23190b diff --git a/util.c b/util.c index 5df811d03..5e3654d1d 100644 --- a/util.c +++ b/util.c @@ -1359,7 +1359,9 @@ bool fstype_is_network(const char *fstype) { "smbfs", "ncpfs", "nfs", - "nfs4" + "nfs4", + "gfs", + "gfs2" }; unsigned i; @@ -1908,6 +1910,23 @@ int make_stdio(int fd) { return 0; } +bool is_clean_exit(int code, int status) { + + if (code == CLD_EXITED) + return status == 0; + + /* If a daemon does not implement handlers for some of the + * signals that's not considered an unclean shutdown */ + if (code == CLD_KILLED) + return + status == SIGHUP || + status == SIGINT || + status == SIGTERM || + status == SIGPIPE; + + return false; +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime",