summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-08-15 11:57:04 +0200
committerKay Sievers <kay.sievers@suse.de>2005-08-15 11:57:04 +0200
commit40caaeec51f5d8f65245932a85396ac85265cbe5 (patch)
tree4709e15ed4451931e8093de6bff0075ab606325b /udev_rules_parse.c
parent8aafc06d943e98dfa4ff8410eb85686e49feccbf (diff)
cleanup some debug output and move to info level + unify select() loops
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 488b7a7ff0..c14164f1cc 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -642,7 +642,13 @@ int udev_rules_init(struct udev_rules *rules, int read_compiled, int resolve_nam
retval = add_matching_files(&name_list, udev_rules_filename, RULEFILE_SUFFIX);
list_for_each_entry_safe(name_loop, name_tmp, &name_list, node) {
- parse_file(rules, name_loop->name);
+ if (stat(name_loop->name, &stats) == 0) {
+ if (stats.st_size)
+ parse_file(rules, name_loop->name);
+ else
+ dbg("empty rules file '%s'", name_loop->name);
+ } else
+ dbg("could not read '%s'", name_loop->name);
list_del(&name_loop->node);
free(name_loop);
}