diff options
author | Tom Gundersen <teg@jklm.no> | 2015-08-25 16:46:27 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-08-25 16:46:27 +0200 |
commit | 498fb56739a5d18cb85d2ba3523759b1d141d770 (patch) | |
tree | d68a7330da711f320063046007cddfbf469fea6f /src/basic/hostname-util.h | |
parent | 3ad216b44f4f5cba168f449ae455607a442cfd4c (diff) | |
parent | ef3100e9637adda26fa19e7ee8606788320dcde3 (diff) |
Merge pull request #1022 from poettering/machinectl-shell
Add new "machinectl shell" command for su(1)-like behaviour
Diffstat (limited to 'src/basic/hostname-util.h')
-rw-r--r-- | src/basic/hostname-util.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index a1ca94980d..d4f5bfe45e 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -29,9 +29,11 @@ bool hostname_is_set(void); char* gethostname_malloc(void); -bool hostname_is_valid(const char *s, bool relax) _pure_; +bool hostname_is_valid(const char *s, bool allow_trailing_dot) _pure_; char* hostname_cleanup(char *s); +#define machine_name_is_valid(s) hostname_is_valid(s, false) + bool is_localhost(const char *hostname); bool is_gateway_hostname(const char *hostname); |