Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * fs/sysfs/sysfs.h - sysfs internal header file
0004  *
0005  * Copyright (c) 2001-3 Patrick Mochel
0006  * Copyright (c) 2007 SUSE Linux Products GmbH
0007  * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
0008  */
0009 
0010 #ifndef __SYSFS_INTERNAL_H
0011 #define __SYSFS_INTERNAL_H
0012 
0013 #include <linux/sysfs.h>
0014 
0015 /*
0016  * mount.c
0017  */
0018 extern struct kernfs_node *sysfs_root_kn;
0019 
0020 /*
0021  * dir.c
0022  */
0023 extern spinlock_t sysfs_symlink_target_lock;
0024 
0025 void sysfs_warn_dup(struct kernfs_node *parent, const char *name);
0026 
0027 /*
0028  * file.c
0029  */
0030 int sysfs_add_file_mode_ns(struct kernfs_node *parent,
0031         const struct attribute *attr, umode_t amode, kuid_t uid,
0032         kgid_t gid, const void *ns);
0033 int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent,
0034         const struct bin_attribute *battr, umode_t mode,
0035         kuid_t uid, kgid_t gid, const void *ns);
0036 
0037 /*
0038  * symlink.c
0039  */
0040 int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target,
0041              const char *name);
0042 
0043 #endif  /* __SYSFS_INTERNAL_H */