X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Futil.h;h=72ddd36e556bc8954063c88767c73fb73a8f10e7;hb=4fe60156fc45e34c7bcba4779123e15620532dff;hp=192ebff1fae4eb87dd19e90c17ca30579ff98841;hpb=ef2df9f41541a62fb7876b98701ab072b41325e2;p=elogind.git diff --git a/src/util.h b/src/util.h index 192ebff1f..72ddd36e5 100644 --- a/src/util.h +++ b/src/util.h @@ -83,6 +83,9 @@ struct timespec *timespec_store(struct timespec *ts, usec_t u); usec_t timeval_load(const struct timeval *tv); struct timeval *timeval_store(struct timeval *tv, usec_t u); +size_t page_size(void); +#define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) + #define streq(a,b) (strcmp((a),(b)) == 0) #define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) @@ -389,6 +392,12 @@ int kill_and_sigcont(pid_t pid, int sig); bool nulstr_contains(const char*nulstr, const char *needle); +bool plymouth_running(void); + +void parse_syslog_priority(char **p, int *priority); + +int have_effective_cap(int value); + #define NULSTR_FOREACH(i, l) \ for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1) @@ -401,8 +410,8 @@ int ioprio_class_from_string(const char *s); const char *sigchld_code_to_string(int i); int sigchld_code_from_string(const char *s); -const char *log_facility_to_string(int i); -int log_facility_from_string(const char *s); +const char *log_facility_unshifted_to_string(int i); +int log_facility_unshifted_from_string(const char *s); const char *log_level_to_string(int i); int log_level_from_string(const char *s);