summaryrefslogtreecommitdiff
path: root/udev/udev_rules.h
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2008-09-09 00:09:49 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-09-09 00:09:49 +0200
commitdf7ae680d88f77ff67f44a49c57dd0079b527a60 (patch)
treefcc06b46c493b733dd2d9fde6f9c7aa9a7cdf9ce /udev/udev_rules.h
parenta035bf274477689920bcac12792b28de9d35ab6c (diff)
threadsafe rules iteration
Move ->current out of "struct udev_rules" and into a new "struct udev_rules_iter". Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Diffstat (limited to 'udev/udev_rules.h')
-rw-r--r--udev/udev_rules.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/udev/udev_rules.h b/udev/udev_rules.h
index 4f95121f30..b2e5d571ce 100644
--- a/udev/udev_rules.h
+++ b/udev/udev_rules.h
@@ -111,16 +111,20 @@ struct udev_rules {
struct udev *udev;
char *buf;
size_t bufsize;
- size_t current;
int resolve_names;
};
+struct udev_rules_iter {
+ struct udev_rules *rules;
+ size_t current;
+};
+
extern int udev_rules_init(struct udev *udev, struct udev_rules *rules, int resolve_names);
extern void udev_rules_cleanup(struct udev_rules *rules);
-extern void udev_rules_iter_init(struct udev_rules *rules);
-extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules);
-extern struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *label);
+extern void udev_rules_iter_init(struct udev_rules_iter *iter, struct udev_rules *rules);
+extern struct udev_rule *udev_rules_iter_next(struct udev_rules_iter *iter);
+extern struct udev_rule *udev_rules_iter_label(struct udev_rules_iter *iter, const char *label);
extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev);
extern int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev);