aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@gmail.com>2006-12-19 16:01:27 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-20 13:56:44 -0500
commit542cfce6f36e8c43f71ae9c235b78497f350ae55 (patch)
tree9f8733a9295160c3817f26a08a1bfb0b78a95c8d /include
parentf334b60b43a0927f4ab1187cbdb4582f5227c3b1 (diff)
kobject: kobject_uevent() returns manageable value
Since kobject_uevent() function does not return an integer value to indicate if its operation was completed with success or not, it is worth changing it in order to report a proper status (success or error) instead of returning void. [randy.dunlap@oracle.com: Fix inline kobject functions] Cc: Mauricio Lin <mauriciolin@gmail.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kobject.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index d1c8d28fa92e..76538fcf2c4e 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -265,8 +265,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
265 struct subsys_attribute *); 265 struct subsys_attribute *);
266 266
267#if defined(CONFIG_HOTPLUG) 267#if defined(CONFIG_HOTPLUG)
268void kobject_uevent(struct kobject *kobj, enum kobject_action action); 268int kobject_uevent(struct kobject *kobj, enum kobject_action action);
269void kobject_uevent_env(struct kobject *kobj, enum kobject_action action, 269int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
270 char *envp[]); 270 char *envp[]);
271 271
272int add_uevent_var(char **envp, int num_envp, int *cur_index, 272int add_uevent_var(char **envp, int num_envp, int *cur_index,
@@ -274,11 +274,12 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
274 const char *format, ...) 274 const char *format, ...)
275 __attribute__((format (printf, 7, 8))); 275 __attribute__((format (printf, 7, 8)));
276#else 276#else
277static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } 277static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action)
278static inline void kobject_uevent_env(struct kobject *kobj, 278{ return 0; }
279static inline int kobject_uevent_env(struct kobject *kobj,
279 enum kobject_action action, 280 enum kobject_action action,
280 char *envp[]) 281 char *envp[])
281{ } 282{ return 0; }
282 283
283static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, 284static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
284 char *buffer, int buffer_size, int *cur_len, 285 char *buffer, int buffer_size, int *cur_len,