2018-01-22 15:18:13 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2007-09-20 08:31:38 +00:00
|
|
|
/*
|
|
|
|
* fs/sysfs/sysfs.h - sysfs internal header file
|
|
|
|
*
|
|
|
|
* Copyright (c) 2001-3 Patrick Mochel
|
|
|
|
* Copyright (c) 2007 SUSE Linux Products GmbH
|
|
|
|
* Copyright (c) 2007 Tejun Heo <teheo@suse.de>
|
|
|
|
*/
|
|
|
|
|
2013-11-28 19:54:31 +00:00
|
|
|
#ifndef __SYSFS_INTERNAL_H
|
|
|
|
#define __SYSFS_INTERNAL_H
|
2009-09-09 18:25:37 +00:00
|
|
|
|
2013-11-28 19:54:31 +00:00
|
|
|
#include <linux/sysfs.h>
|
2007-06-13 19:27:24 +00:00
|
|
|
|
2007-09-20 07:05:10 +00:00
|
|
|
/*
|
|
|
|
* mount.c
|
|
|
|
*/
|
2013-12-11 19:11:53 +00:00
|
|
|
extern struct kernfs_node *sysfs_root_kn;
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2007-09-20 07:05:10 +00:00
|
|
|
/*
|
|
|
|
* dir.c
|
|
|
|
*/
|
2013-10-30 14:28:36 +00:00
|
|
|
extern spinlock_t sysfs_symlink_target_lock;
|
2007-09-20 07:05:10 +00:00
|
|
|
|
2013-12-11 19:11:53 +00:00
|
|
|
void sysfs_warn_dup(struct kernfs_node *parent, const char *name);
|
2007-09-20 07:05:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* file.c
|
|
|
|
*/
|
2013-12-11 19:11:53 +00:00
|
|
|
int sysfs_add_file_mode_ns(struct kernfs_node *parent,
|
2021-09-13 05:41:12 +00:00
|
|
|
const struct attribute *attr, umode_t amode, kuid_t uid,
|
|
|
|
kgid_t gid, const void *ns);
|
|
|
|
int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent,
|
|
|
|
const struct bin_attribute *battr, umode_t mode,
|
|
|
|
kuid_t uid, kgid_t gid, const void *ns);
|
2013-10-01 21:42:07 +00:00
|
|
|
|
2007-09-20 07:05:10 +00:00
|
|
|
/*
|
|
|
|
* symlink.c
|
|
|
|
*/
|
2013-12-11 19:11:53 +00:00
|
|
|
int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target,
|
2013-01-25 20:51:13 +00:00
|
|
|
const char *name);
|
2013-11-28 19:54:31 +00:00
|
|
|
|
|
|
|
#endif /* __SYSFS_INTERNAL_H */
|