-static bool check_rules_timestamp(struct udev *udev)
-{
- char **p;
- unsigned long long *stamp_usec;
- int i, n;
- bool changed = false;
-
- n = udev_get_rules_path(udev, &p, &stamp_usec);
- for (i = 0; i < n; i++) {
- struct stat stats;
-
- if (stat(p[i], &stats) < 0)
- continue;
-
- if (stamp_usec[i] == ts_usec(&stats.st_mtim))
- continue;
-
- /* first check */
- if (stamp_usec[i] != 0) {
- log_debug("reload - timestamp of '%s' changed\n", p[i]);
- changed = true;
- }
-
- /* update timestamp */
- stamp_usec[i] = ts_usec(&stats.st_mtim);
- }
-
- return changed;
-}
-