250273f2722eb27e52774adfb560e7d92cbbac41
[petitboot] / udev.h
1 #ifndef _UDEV_H
2 #define _UDEV_H
3
4 enum udev_action {
5         UDEV_ACTION_ADD,
6         UDEV_ACTION_REMOVE,
7 };
8
9 struct udev_event {
10         enum udev_action action;
11         char *device;
12
13         struct param {
14                 char *name;
15                 char *value;
16         } *params;
17         int n_params;
18 };
19
20 struct udev;
21 struct device_handler;
22
23 struct udev *udev_init(struct device_handler *handler);
24
25 void udev_destroy(struct udev *udev);
26
27 const char *udev_event_param(struct udev_event *event, const char *name);
28 #endif /* _UDEV_H */