udev: check stats of .link files and their drop-in files

Fixes #23128.
This commit is contained in:
Yu Watanabe
2022-05-03 10:26:22 +02:00
committed by Daan De Meyer
parent 968680b23d
commit bdb2d3c688
4 changed files with 170 additions and 35 deletions
-22
View File
@@ -591,28 +591,6 @@ int network_load(Manager *manager, OrderedHashmap **networks) {
return 0;
}
static bool stats_by_path_equal(Hashmap *a, Hashmap *b) {
struct stat *st_a, *st_b;
const char *path;
assert(a);
assert(b);
if (hashmap_size(a) != hashmap_size(b))
return false;
HASHMAP_FOREACH_KEY(st_a, path, a) {
st_b = hashmap_get(b, path);
if (!st_b)
return false;
if (!stat_inode_unmodified(st_a, st_b))
return false;
}
return true;
}
int network_reload(Manager *manager) {
OrderedHashmap *new_networks = NULL;
Network *n, *old;