summaryrefslogtreecommitdiff
path: root/libmultipath/uevent.h
blob: 55ce42c636574621f29bf1814791e55aae97d3f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* environment buffer, the kernel's size in lib/kobject_uevent.c should fit in */
#define HOTPLUG_BUFFER_SIZE		1024
#define HOTPLUG_NUM_ENVP		32
#define OBJECT_SIZE			512

#ifndef NETLINK_KOBJECT_UEVENT
#define NETLINK_KOBJECT_UEVENT		15
#endif

struct uevent {
	void *next;
	char buffer[HOTPLUG_BUFFER_SIZE + OBJECT_SIZE];
	char *devpath;
	char *action;
	char *envp[HOTPLUG_NUM_ENVP];
};

int uevent_listen(int (*store_uev)(struct uevent *, void * trigger_data),
		  void * trigger_data);