aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-11-10 23:33:52 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 19:18:07 -0500
commit0296b2281352e4794e174b393c37f131502e09f0 (patch)
tree874e1de7ffaf56ab14f031d2818b69853c4914d8 /lib
parent034382117725f6b6b26fbb138498139c5c012c1b (diff)
[PATCH] remove CONFIG_KOBJECT_UEVENT option
It makes zero sense to have hotplug, but not the netlink events enabled today. Remove this option and merge the kobject_uevent.h header into the kobject.h header file. Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject_uevent.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 3ab375411e38..1f90eea7eebc 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -19,14 +19,17 @@
19#include <linux/skbuff.h> 19#include <linux/skbuff.h>
20#include <linux/netlink.h> 20#include <linux/netlink.h>
21#include <linux/string.h> 21#include <linux/string.h>
22#include <linux/kobject_uevent.h>
23#include <linux/kobject.h> 22#include <linux/kobject.h>
24#include <net/sock.h> 23#include <net/sock.h>
25 24
26#define BUFFER_SIZE 1024 /* buffer for the hotplug env */ 25#define BUFFER_SIZE 1024 /* buffer for the hotplug env */
27#define NUM_ENVP 32 /* number of env pointers */ 26#define NUM_ENVP 32 /* number of env pointers */
28 27
29#if defined(CONFIG_KOBJECT_UEVENT) || defined(CONFIG_HOTPLUG) 28#if defined(CONFIG_HOTPLUG)
29char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
30u64 hotplug_seqnum;
31static DEFINE_SPINLOCK(sequence_lock);
32
30static char *action_to_string(enum kobject_action action) 33static char *action_to_string(enum kobject_action action)
31{ 34{
32 switch (action) { 35 switch (action) {
@@ -48,9 +51,7 @@ static char *action_to_string(enum kobject_action action)
48 return NULL; 51 return NULL;
49 } 52 }
50} 53}
51#endif
52 54
53#ifdef CONFIG_KOBJECT_UEVENT
54static struct sock *uevent_sock; 55static struct sock *uevent_sock;
55 56
56/** 57/**
@@ -168,21 +169,6 @@ static int __init kobject_uevent_init(void)
168 169
169postcore_initcall(kobject_uevent_init); 170postcore_initcall(kobject_uevent_init);
170 171
171#else
172static inline int send_uevent(const char *signal, const char *obj,
173 char **envp, int gfp_mask)
174{
175 return 0;
176}
177
178#endif /* CONFIG_KOBJECT_UEVENT */
179
180
181#ifdef CONFIG_HOTPLUG
182char hotplug_path[HOTPLUG_PATH_LEN] = "/sbin/hotplug";
183u64 hotplug_seqnum;
184static DEFINE_SPINLOCK(sequence_lock);
185
186/** 172/**
187 * kobject_hotplug - notify userspace by executing /sbin/hotplug 173 * kobject_hotplug - notify userspace by executing /sbin/hotplug
188 * 174 *