2003-08-15 18:22:31

by Stephen Hemminger

[permalink] [raw]
Subject: [PATCH] kobject rename can take const char

kobject_rename doesn't change the name string.

diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
--- a/include/linux/kobject.h Fri Aug 15 11:19:55 2003
+++ b/include/linux/kobject.h Fri Aug 15 11:19:55 2003
@@ -39,7 +39,7 @@
extern int kobject_add(struct kobject *);
extern void kobject_del(struct kobject *);

-extern void kobject_rename(struct kobject *, char *new_name);
+extern void kobject_rename(struct kobject *, const char *new_name);

extern int kobject_register(struct kobject *);
extern void kobject_unregister(struct kobject *);
diff -Nru a/lib/kobject.c b/lib/kobject.c
--- a/lib/kobject.c Fri Aug 15 11:19:55 2003
+++ b/lib/kobject.c Fri Aug 15 11:19:55 2003
@@ -319,7 +319,7 @@
* @new_name: object's new name
*/

-void kobject_rename(struct kobject * kobj, char *new_name)
+void kobject_rename(struct kobject * kobj, const char *new_name)
{
kobj = kobject_get(kobj);
if (!kobj)


2003-08-15 19:23:32

by Patrick Mochel

[permalink] [raw]
Subject: Re: [PATCH] kobject rename can take const char


> kobject_rename doesn't change the name string.

Thanks, both applied.


Pat