--- linux-test3-pre5/kernel/kmod.c	Fri Jul  7 08:39:58 2000
+++ linux/kernel/kmod.c	Mon Jul 10 22:18:49 2000
@@ -218,3 +218,26 @@
 	}
 	return 0;
 }
+
+
+#ifdef CONFIG_HOTPLUG
+/*
+	hotplug path is set via /proc/sys
+	invoked by hotplug-aware bus drivers,
+	with exec_usermodehelper and some thread-spawner
+
+	argv [0] = hotplug_path;
+	argv [1] = "usb", "scsi", "pci", "network", etc;
+	... plus optional type-specific parameters
+	argv [n] = 0;
+
+	envp [*] = HOME, PATH; optional type-specific parameters
+
+	a hotplug bus should invoke this for device add/remove
+	events.  the command is expected to load drivers when
+	necessary, and may perform additional system setup.
+*/
+char hotplug_path[256] = "/sbin/hotplug";
+
+#endif
+
--- linux-test3-pre5/include/linux/kmod.h	Fri Jul  7 08:39:59 2000
+++ linux/include/linux/kmod.h	Fri Jul  7 20:32:13 2000
@@ -8,6 +8,9 @@
 #ifdef CONFIG_KMOD
 extern int request_module(const char * name);
 extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]);
+#ifdef CONFIG_HOTPLUG
+extern char hotplug_path [];
+#endif
 #else
 static inline int request_module(const char * name) { return -ENOSYS; }
 static inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
--- linux-test3-pre5/kernel/ksyms.c	Fri Jul  7 08:39:58 2000
+++ linux/kernel/ksyms.c	Fri Jul  7 20:34:04 2000
@@ -77,6 +77,9 @@
 #ifdef CONFIG_KMOD
 EXPORT_SYMBOL(request_module);
 EXPORT_SYMBOL(exec_usermodehelper);
+#ifdef CONFIG_HOTPLUG
+EXPORT_SYMBOL(hotplug_path);
+#endif
 #endif
 
 #ifdef CONFIG_MODULES
--- linux-test3-pre5/kernel/sysctl.c	Fri Jul  7 08:39:58 2000
+++ linux/kernel/sysctl.c	Fri Jul  7 20:34:46 2000
@@ -53,6 +53,9 @@
 
 #ifdef CONFIG_KMOD
 extern char modprobe_path[];
+#ifdef CONFIG_HOTPLUG
+extern char hotplug_path[];
+#endif
 #endif
 #ifdef CONFIG_CHR_DEV_SG
 extern int sg_big_buff;
@@ -184,6 +187,10 @@
 #ifdef CONFIG_KMOD
 	{KERN_MODPROBE, "modprobe", &modprobe_path, 256,
 	 0644, NULL, &proc_dostring, &sysctl_string },
+#ifdef CONFIG_HOTPLUG
+	{KERN_HOTPLUG, "hotplug", &hotplug_path, 256,
+	 0644, NULL, &proc_dostring, &sysctl_string },
+#endif
 #endif
 #ifdef CONFIG_CHR_DEV_SG
 	{KERN_SG_BIG_BUFF, "sg-big-buff", &sg_big_buff, sizeof (int),
--- linux-test3-pre5/include/linux/sysctl.h	Fri Jul  7 08:39:58 2000
+++ linux/include/linux/sysctl.h	Fri Jul  7 08:43:59 2000
@@ -112,6 +112,7 @@
 	KERN_OVERFLOWUID=46,	/* int: overflow UID */
 	KERN_OVERFLOWGID=47,	/* int: overflow GID */
 	KERN_SHMPATH=48,	/* string: path to shm fs */
+	KERN_HOTPLUG=49,	/* string: path to hotplug policy agent */
 };
 
 
