aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject_uevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r--lib/kobject_uevent.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 82fc1794b691..4122f38330d4 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -115,6 +115,16 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
115 return 0; 115 return 0;
116 } 116 }
117 117
118 /* originating subsystem */
119 if (uevent_ops && uevent_ops->name)
120 subsystem = uevent_ops->name(kset, kobj);
121 else
122 subsystem = kobject_name(&kset->kobj);
123 if (!subsystem) {
124 pr_debug("unset subsytem caused the event to drop!\n");
125 return 0;
126 }
127
118 /* environment index */ 128 /* environment index */
119 envp = kzalloc(NUM_ENVP * sizeof (char *), GFP_KERNEL); 129 envp = kzalloc(NUM_ENVP * sizeof (char *), GFP_KERNEL);
120 if (!envp) 130 if (!envp)
@@ -134,12 +144,6 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
134 goto exit; 144 goto exit;
135 } 145 }
136 146
137 /* originating subsystem */
138 if (uevent_ops && uevent_ops->name)
139 subsystem = uevent_ops->name(kset, kobj);
140 else
141 subsystem = kobject_name(&kset->kobj);
142
143 /* event environemnt for helper process only */ 147 /* event environemnt for helper process only */
144 envp[i++] = "HOME=/"; 148 envp[i++] = "HOME=/";
145 envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin"; 149 envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";