summaryrefslogtreecommitdiffstats
path: root/discover/udev.h
blob: 250273f2722eb27e52774adfb560e7d92cbbac41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _UDEV_H
#define _UDEV_H

enum udev_action {
	UDEV_ACTION_ADD,
	UDEV_ACTION_REMOVE,
};

struct udev_event {
	enum udev_action action;
	char *device;

	struct param {
		char *name;
		char *value;
	} *params;
	int n_params;
};

struct udev;
struct device_handler;

struct udev *udev_init(struct device_handler *handler);

void udev_destroy(struct udev *udev);

const char *udev_event_param(struct udev_event *event, const char *name);
#endif /* _UDEV_H */
OpenPOWER on IntegriCloud