X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=util.h;h=a77a952ed6d053436421b14b644f8f9a450604c7;hb=136337ff74f05be3d42a769d9f0cb99716c5c40f;hp=ecf3b15e33721596950fd039513abeedce0b567e;hpb=24a6e4a401f0be0c4cd67621186792d0b7e401a1;p=elogind.git diff --git a/util.h b/util.h index ecf3b15e3..a77a952ed 100644 --- a/util.h +++ b/util.h @@ -89,6 +89,7 @@ static inline bool is_path_absolute(const char *p) { bool endswith(const char *s, const char *postfix); bool startswith(const char *s, const char *prefix); +bool startswith_no_case(const char *s, const char *prefix); bool first_word(const char *s, const char *word); @@ -178,6 +179,10 @@ bool chars_intersect(const char *a, const char *b); char *format_timestamp(char *buf, size_t l, usec_t t); +int make_stdio(int fd); + +bool is_clean_exit(int code, int status); + #define DEFINE_STRING_TABLE_LOOKUP(name,type) \ const char *name##_to_string(type i) { \ if (i < 0 || i >= (type) ELEMENTSOF(name##_table)) \ @@ -226,6 +231,8 @@ ssize_t loop_read(int fd, void *buf, size_t nbytes); int path_is_mount_point(const char *path); +bool is_device_path(const char *path); + extern char * __progname; const char *ioprio_class_to_string(int i);