summaryrefslogtreecommitdiff
path: root/udevd.h
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-06 14:30:15 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:18:32 -0700
commit4a231017ff6e9f66a685b0d1e4e49dc46645bb40 (patch)
tree59df7bd8f73b4ba0a4cca4a482ad133b334f67d5 /udevd.h
parent04b49aab9addcc628381d187d0586c20a8c2cfad (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.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/udevd.h b/udevd.h
index 657f684e3f..b393a28bf9 100644
--- a/udevd.h
+++ b/udevd.h
@@ -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[];
};