aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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 *