Skip to contentSkip to conversation

kobject rename can take const char

PATCH In review Stephen Hemminger 2 participants 2 messages Aug 15, 2003

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

PATCH 1/1 kobject rename can take const char

kobject_rename doesn't change the name string.

include/linux/kobject.h +1 -1
diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
@@ -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 *);
lib/kobject.c +1 -1
diff -Nru a/lib/kobject.c b/lib/kobject.c
@@ -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)
#1 lore raw
Quoted 2 lines

kobject_rename doesn't change the name string.

Thanks, both applied.

Pat