diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-11-06 14:30:15 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:18:32 -0700 |
commit | 4a231017ff6e9f66a685b0d1e4e49dc46645bb40 (patch) | |
tree | 59df7bd8f73b4ba0a4cca4a482ad133b334f67d5 /udevd.h | |
parent | 04b49aab9addcc628381d187d0586c20a8c2cfad (diff) |
[PATCH] pass the whole event environment to udevd
Make _all_ hotplug variables available to the forked udev,
the udev callouts and the udev dev.d/ scripts. We put the
whole environment into a buffer and send it over the udevd
socket. udevd recreates *envp[] and passes it to the exec().
Diffstat (limited to 'udevd.h')
-rw-r--r-- | udevd.h | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -30,14 +30,23 @@ #define SEND_WAIT_MAX_SECONDS 3 #define SEND_WAIT_LOOP_PER_SECOND 10 +/* environment buffer, should match the kernel's size in lib/kobject_uevent.h */ +#define HOTPLUG_BUFFER_SIZE 1024 +#define HOTPLUG_NUM_ENVP 32 -struct hotplug_msg { +struct udevsend_msg { char magic[20]; + char envbuf[HOTPLUG_BUFFER_SIZE]; +}; + +struct hotplug_msg { struct list_head list; pid_t pid; - unsigned long long seqnum; long queue_time; - char action[ACTION_SIZE]; - char devpath[DEVPATH_SIZE]; - char subsystem[SUBSYSTEM_SIZE]; + char *action; + char *devpath; + char *subsystem; + unsigned long long seqnum; + char *envp[HOTPLUG_NUM_ENVP]; + char envbuf[]; }; |