X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.h;h=ddb21b4a9c596b52edf3dc0ea41e70cc0a791c33;hb=e9c1ea9de87d4d508ac38ce87a2fa56e7529a91a;hp=0bcda48b6d7c50a9a02e5eb8116d8ee54188590b;hpb=44a6b1b68029833893f6e9cee35aa27a974038f6;p=elogind.git diff --git a/src/shared/util.h b/src/shared/util.h index 0bcda48b6..ddb21b4a9 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -411,7 +411,7 @@ bool nulstr_contains(const char*nulstr, const char *needle); bool plymouth_running(void); bool hostname_is_valid(const char *s) _pure_; -char* hostname_cleanup(char *s); +char* hostname_cleanup(char *s, bool lowercase); char* strshorten(char *s, size_t l); @@ -439,6 +439,7 @@ char* uid_to_name(uid_t uid); char* gid_to_name(gid_t gid); int glob_exists(const char *path); +int glob_extend(char ***strv, const char *path); int dirent_ensure_type(DIR *d, struct dirent *de); @@ -513,9 +514,6 @@ int setrlimit_closest(int resource, const struct rlimit *rlim); int getenv_for_pid(pid_t pid, const char *field, char **_value); -int can_sleep(const char *type); -int can_sleep_disk(const char *type); - bool is_valid_documentation_url(const char *url) _pure_; bool in_initrd(void); @@ -735,3 +733,4 @@ static inline void _reset_locale_(struct _locale_struct_ *s) { _saved_locale_.quit = true) bool id128_is_valid(const char *s) _pure_; +void parse_user_at_host(char *arg, char **user, char **host);