diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-09-28 11:29:34 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 11:29:34 +0900 |
commit | 07db7f6bb8a94f8ec3aaaf043b76f5432d477501 (patch) | |
tree | 053da942d20ae36f695fc44ac67e684dfd664aac /src/basic | |
parent | bed159888e288c0b6e18d9bbb4fd6af41cf8c968 (diff) | |
parent | c01b9b879c729a2099e0c9bd00d6ca10a2dd8688 (diff) | |
download | systemd-07db7f6bb8a94f8ec3aaaf043b76f5432d477501.tar.gz |
Merge pull request #20846 from yuwata/sd-lldp-tx
network: move LLDP transmission feature to libsystemd-network
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/hostname-util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index 28975c8792..0d1574db9e 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -4,6 +4,7 @@ #include <stdbool.h> #include <stdio.h> +#include "env-file.h" #include "macro.h" #include "strv.h" @@ -60,3 +61,7 @@ static inline bool is_outbound_hostname(const char *hostname) { /* This tries to identify the valid syntaxes for the our synthetic "outbound" host. */ return STRCASE_IN_SET(hostname, "_outbound", "_outbound."); } + +static inline int get_pretty_hostname(char **ret) { + return parse_env_file(NULL, "/etc/machine-info", "PRETTY_HOSTNAME", ret); +} |