Skip to contentSkip to conversation

kobject: kobject_uevent() returns manageable value

PATCH New Aneesh Kumar K.V 1 participant 1 message Dec 12, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 include/linux/kobject.h |    8 ++++----
 lib/kobject_uevent.c    |   44 ++++++++++++++++++++++++++++++--------------
 2 files changed, 34 insertions(+), 18 deletions(-)
include/linux/kobject.h +4 -4
index d1c8d28..fc93c53 100644
@@ -265,8 +265,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
 					struct subsys_attribute *);
 
 #if defined(CONFIG_HOTPLUG)
-void kobject_uevent(struct kobject *kobj, enum kobject_action action);
-void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+int kobject_uevent(struct kobject *kobj, enum kobject_action action);
+int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
 			char *envp[]);
 
 int add_uevent_var(char **envp, int num_envp, int *cur_index,
@@ -274,8 +274,8 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
 			const char *format, ...)
 	__attribute__((format (printf, 7, 8)));
 #else
-static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
-static inline void kobject_uevent_env(struct kobject *kobj,
+static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
+static inline int kobject_uevent_env(struct kobject *kobj,
 				      enum kobject_action action,
 				      char *envp[])
 { }
lib/kobject_uevent.c +30 -14

100 lines not on this page · raw message

Signature · 1 line
1.4.4.2.gdb98-dirty