mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-16 11:32:41 +00:00
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>
This commit is contained in:
parent
f334b60b43
commit
542cfce6f3
2 changed files with 36 additions and 19 deletions
|
@ -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,11 +274,12 @@ 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)
|
||||
{ return 0; }
|
||||
static inline int kobject_uevent_env(struct kobject *kobj,
|
||||
enum kobject_action action,
|
||||
char *envp[])
|
||||
{ }
|
||||
{ return 0; }
|
||||
|
||||
static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
char *buffer, int buffer_size, int *cur_len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue