renaming in debugfs?
For the wiphy stuff I wanted to provide a debugfs as well as a sysfs dir for drivers (or the d80211 stack).
But then I decided that stable wiphy names will be a good thing instead of just numbering them wiphy%d. Does anyone have any idea how to rename directories in debugfs? I guess that for sysfs it'll just work if I change the kobject name, but maybe that's wrong too?
johannes
Quoted 7 lines · Johannes Berg
For the wiphy stuff I wanted to provide a debugfs as well as a sysfs dir for drivers (or the d80211 stack).
But then I decided that stable wiphy names will be a good thing instead of just numbering them wiphy%d. Does anyone have any idea how to rename directories in debugfs? I guess that for sysfs it'll just work if I change the kobject name, but maybe that's wrong too?
No, use kobject_rename() if you want to rename a kobject in sysfs (or the real device_rename() call if you have a struct device).
For debugfs, there is no rename function yet, but it would be pretty trivial to add one if you wish.
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 7 lines · Johannes Berg
For the wiphy stuff I wanted to provide a debugfs as well as a sysfs dir for drivers (or the d80211 stack).
But then I decided that stable wiphy names will be a good thing instead of just numbering them wiphy%d. Does anyone have any idea how to rename directories in debugfs? I guess that for sysfs it'll just work if I change the kobject name, but maybe that's wrong too?
No, use
kobject_rename()if you want to rename a kobject in sysfs (or the realdevice_rename()call if you have a struct device).
Ok.
Quoted 2 lines
For debugfs, there is no rename function yet, but it would be pretty trivial to add one if you wish.
Alright, when I get around to actually doing renaming in cfg80211 (it's not really high priority right now) it I'll check out how it would be done.
johannes
Quoted 2 lines · Greg KH
For debugfs, there is no rename function yet, but it would be pretty trivial to add one if you wish.
I tried to, but failed.
http://johannes.sipsolutions.net/patches/debugfs-rename.patch
does absolutely nothing at all, not even return an error! What am I doing wrong? :)
johannes