Greg Kroah-Hartman | 619daee | 2018-01-22 16:18:13 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Tejun Heo | 6d66f5c | 2007-09-20 17:31:38 +0900 | [diff] [blame] | 2 | /* |
| 3 | * fs/sysfs/sysfs.h - sysfs internal header file |
| 4 | * |
| 5 | * Copyright (c) 2001-3 Patrick Mochel |
| 6 | * Copyright (c) 2007 SUSE Linux Products GmbH |
| 7 | * Copyright (c) 2007 Tejun Heo <teheo@suse.de> |
Tejun Heo | 6d66f5c | 2007-09-20 17:31:38 +0900 | [diff] [blame] | 8 | */ |
| 9 | |
Tejun Heo | ae6621b | 2013-11-28 14:54:31 -0500 | [diff] [blame] | 10 | #ifndef __SYSFS_INTERNAL_H |
| 11 | #define __SYSFS_INTERNAL_H |
David P. Quigley | ddd29ec | 2009-09-09 14:25:37 -0400 | [diff] [blame] | 12 | |
Tejun Heo | ae6621b | 2013-11-28 14:54:31 -0500 | [diff] [blame] | 13 | #include <linux/sysfs.h> |
Tejun Heo | fb6896d | 2007-06-14 04:27:24 +0900 | [diff] [blame] | 14 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 15 | /* |
| 16 | * mount.c |
| 17 | */ |
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 18 | extern struct kernfs_node *sysfs_root_kn; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 20 | /* |
| 21 | * dir.c |
| 22 | */ |
Tejun Heo | 0cae60f | 2013-10-30 10:28:36 -0400 | [diff] [blame] | 23 | extern spinlock_t sysfs_symlink_target_lock; |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 24 | |
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 25 | void sysfs_warn_dup(struct kernfs_node *parent, const char *name); |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 26 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 27 | /* |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 28 | * file.c |
| 29 | */ |
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 30 | int sysfs_add_file_mode_ns(struct kernfs_node *parent, |
Christoph Hellwig | 5cf3bb0 | 2021-09-13 07:41:12 +0200 | [diff] [blame] | 31 | const struct attribute *attr, umode_t amode, kuid_t uid, |
| 32 | kgid_t gid, const void *ns); |
| 33 | int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent, |
| 34 | const struct bin_attribute *battr, umode_t mode, |
| 35 | kuid_t uid, kgid_t gid, const void *ns); |
Tejun Heo | 73d9714 | 2013-10-01 17:42:07 -0400 | [diff] [blame] | 36 | |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 37 | /* |
Tejun Heo | 59f6901 | 2007-09-20 16:05:10 +0900 | [diff] [blame] | 38 | * symlink.c |
| 39 | */ |
Tejun Heo | 324a56e | 2013-12-11 14:11:53 -0500 | [diff] [blame] | 40 | int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target, |
Rafael J. Wysocki | 0bb8f3d | 2013-01-25 21:51:13 +0100 | [diff] [blame] | 41 | const char *name); |
Tejun Heo | ae6621b | 2013-11-28 14:54:31 -0500 | [diff] [blame] | 42 | |
| 43 | #endif /* __SYSFS_INTERNAL_H */ |