Commit 3b8c1cb0 authored by Kay Sievers's avatar Kay Sievers
Browse files

udev: initialize rules dir timestamps when reading rules

On Wed, Aug 8, 2012 at 11:48 AM, Michael Schroeder <mls@suse.de> wrote:
> if rules are installed in the first 3 seconds after the udev start,
> the stamps will all be zero, so the [first] call to check_rules_timestamp()
> will just copy the current mtime [and not cause a rules re-load].
parent 5ea373e1
......@@ -1770,12 +1770,15 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
return NULL;
}
strv_uniq(rules->dirs);
rules->dirs_ts_usec = calloc(strv_length(rules->dirs), sizeof(long long));
udev_rules_check_timestamp(rules);
r = conf_files_list_strv(&files, ".rules", (const char **)rules->dirs);
if (r < 0) {
log_error("failed to enumerate rules files: %s\n", strerror(-r));
return NULL;
}
rules->dirs_ts_usec = calloc(strv_length(rules->dirs), sizeof(long long));
/*
* The offset value in the rules strct is limited; add all
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment