diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-12-04 18:39:23 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-12-16 11:02:15 +0100 |
commit | e2054217d506c73232d00c850bb46ea9caf26cd8 (patch) | |
tree | 089308c31dbb9c0ec9a09279f869e91c049c62df /src/basic/hostname-util.h | |
parent | 7d9ec609903a0d4ae121bb2cc39aa74773eee984 (diff) | |
download | systemd-e2054217d506c73232d00c850bb46ea9caf26cd8.tar.gz |
Move hostname setup logic to new shared/hostname-setup.[ch]
No functional change, just moving a bunch of things around. Before
we needed a rather complicated setup to test hostname_setup(), because
the code was in src/core/. When things are moved to src/shared/
we can just test it as any function.
The test is still "unsafe" because hostname_setup() may modify the
hostname.
Diffstat (limited to 'src/basic/hostname-util.h')
-rw-r--r-- | src/basic/hostname-util.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index fe417297ee..6cff9c1d4c 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -7,8 +7,6 @@ #include "macro.h" #include "strv.h" -bool hostname_is_set(void); - char* gethostname_malloc(void); char* gethostname_short_malloc(void); int gethostname_strict(char **ret); @@ -29,10 +27,3 @@ static inline bool is_gateway_hostname(const char *hostname) { /* This tries to identify the valid syntaxes for the our synthetic "gateway" host. */ return STRCASE_IN_SET(hostname, "_gateway", "_gateway."); } - -int sethostname_idempotent(const char *s); - -int shorten_overlong(const char *s, char **ret); - -int read_etc_hostname_stream(FILE *f, char **ret); -int read_etc_hostname(const char *path, char **ret); |