summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-util.c')
-rw-r--r--src/network/networkd-util.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/network/networkd-util.c b/src/network/networkd-util.c
index ac6f1680ca..1c0987bc33 100644
--- a/src/network/networkd-util.c
+++ b/src/network/networkd-util.c
@@ -243,50 +243,6 @@ int config_parse_mud_url(
return free_and_replace(*url, unescaped);
}
-static void network_config_hash_func(const NetworkConfigSection *c, struct siphash *state) {
- siphash24_compress_string(c->filename, state);
- siphash24_compress(&c->line, sizeof(c->line), state);
-}
-
-static int network_config_compare_func(const NetworkConfigSection *x, const NetworkConfigSection *y) {
- int r;
-
- r = strcmp(x->filename, y->filename);
- if (r != 0)
- return r;
-
- return CMP(x->line, y->line);
-}
-
-DEFINE_HASH_OPS(network_config_hash_ops, NetworkConfigSection, network_config_hash_func, network_config_compare_func);
-
-int network_config_section_new(const char *filename, unsigned line, NetworkConfigSection **s) {
- NetworkConfigSection *cs;
-
- cs = malloc0(offsetof(NetworkConfigSection, filename) + strlen(filename) + 1);
- if (!cs)
- return -ENOMEM;
-
- strcpy(cs->filename, filename);
- cs->line = line;
-
- *s = TAKE_PTR(cs);
-
- return 0;
-}
-
-unsigned hashmap_find_free_section_line(Hashmap *hashmap) {
- NetworkConfigSection *cs;
- unsigned n = 0;
- void *entry;
-
- HASHMAP_FOREACH_KEY(entry, cs, hashmap)
- if (n < cs->line)
- n = cs->line;
-
- return n + 1;
-}
-
int log_link_message_full_errno(Link *link, sd_netlink_message *m, int level, int err, const char *msg) {
const char *err_msg = NULL;