mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-21 18:03:41 +03:00
udev: skipping empty udev rules file while collecting the stats
To keep align with the logic used in udev_rules_parse_file(), we also should skip the empty udev rules file while collecting the stats during manager reload. Otherwise all udev rules files will be parsed again whenever reloading udev manager with an empty udev rules file. It's time consuming and the following uevents will fail with timeout. (cherry picked from commit 2ae79a31b7c7947e2c16e18eb85ac5607ebc40b6) (cherry picked from commit 688eb20fdb9c4bcc6d205323f9cec119d6273169) (cherry picked from commit 484d31a58d7b820fa83a70a9f654b907130eec75) (cherry picked from commit 8b6ae951d389cf9e2caccd752afdd32dcdca2ed3)
This commit is contained in:
parent
3ddb7955eb
commit
e0b8d7341e
@ -693,6 +693,10 @@ int config_get_stats_by_path(
|
||||
return -errno;
|
||||
}
|
||||
|
||||
/* Skipping an empty file. */
|
||||
if (null_or_empty(&st))
|
||||
continue;
|
||||
|
||||
r = hashmap_put_stats_by_path(&stats_by_path, *f, &st);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user