X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Futil.h;h=2bf86d997951d27d731386440fafc6f6d878a04c;hb=6daf4f9001d87da9e92c04ff606b454c209f0951;hp=f21aecf256e7219a533648da732c62fe7572945a;hpb=c899f8c61a6f42ec53dbc5645e0ff96c58b2d57a;p=elogind.git diff --git a/src/util.h b/src/util.h index f21aecf25..2bf86d997 100644 --- a/src/util.h +++ b/src/util.h @@ -31,6 +31,7 @@ #include #include #include +#include #include "macro.h" @@ -82,6 +83,7 @@ usec_t timeval_load(const struct timeval *tv); struct timeval *timeval_store(struct timeval *tv, usec_t u); #define streq(a,b) (strcmp((a),(b)) == 0) +#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) bool streq_ptr(const char *a, const char *b); @@ -355,6 +357,10 @@ char *unquote(const char *s, const char *quotes); int wait_for_terminate(pid_t pid, siginfo_t *status); int wait_for_terminate_and_warn(const char *name, pid_t pid); +_noreturn_ void freeze(void); + +bool null_or_empty(struct stat *st); + #define NULSTR_FOREACH(i, l) \ for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)