-static void append_dns(FILE *f, struct in_addr *dns, unsigned char family, unsigned *count) {
- char buf[INET6_ADDRSTRLEN];
- const char *address;
-
- address = inet_ntop(family, dns, buf, INET6_ADDRSTRLEN);
- if (!address) {
- log_warning("Invalid DNS address. Ignoring.");
- return;
- }
-
- if (*count == MAXNS)
- fputs("# Too many DNS servers configured, the following entries "
- "will be ignored\n", f);
-
- fprintf(f, "nameserver %s\n", address);
-
- (*count) ++;
-}
-
-int manager_update_resolv_conf(Manager *m) {
- _cleanup_free_ char *temp_path = NULL;
- _cleanup_fclose_ FILE *f = NULL;