mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sysfs, kernfs: introduce kernfs_rename[_ns]()
Introduce kernfs rename interface, krenfs_rename[_ns](). This is just rename of sysfs_rename(). No functional changes. Function comment is added to kernfs_rename_ns() and @new_parent_sd is renamed to @new_parent for consistency with other kernfs interfaces. v2: Dummy implementation for !CONFIG_SYSFS updated to return -ENOSYS. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5d0e26bb59
commit
890ece160c
4 changed files with 23 additions and 12 deletions
|
@ -20,6 +20,8 @@ struct sysfs_dirent *kernfs_create_link(struct sysfs_dirent *parent,
|
|||
void kernfs_remove(struct sysfs_dirent *sd);
|
||||
int kernfs_remove_by_name_ns(struct sysfs_dirent *parent, const char *name,
|
||||
const void *ns);
|
||||
int kernfs_rename_ns(struct sysfs_dirent *sd, struct sysfs_dirent *new_parent,
|
||||
const char *new_name, const void *new_ns);
|
||||
|
||||
#else /* CONFIG_SYSFS */
|
||||
|
||||
|
@ -34,6 +36,11 @@ static inline int kernfs_remove_by_name_ns(struct sysfs_dirent *parent,
|
|||
const char *name, const void *ns)
|
||||
{ return -ENOSYS; }
|
||||
|
||||
static inline int kernfs_rename_ns(struct sysfs_dirent *sd,
|
||||
struct sysfs_dirent *new_parent,
|
||||
const char *new_name, const void *new_ns)
|
||||
{ return -ENOSYS; }
|
||||
|
||||
#endif /* CONFIG_SYSFS */
|
||||
|
||||
static inline int kernfs_remove_by_name(struct sysfs_dirent *parent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue