blob: 0e2f1cccb812c3e33123214bb0b6781a98d82cbd [file] [log] [blame]
Tejun Heo6d66f5c2007-09-20 17:31:38 +09001/*
2 * fs/sysfs/sysfs.h - sysfs internal header file
3 *
4 * Copyright (c) 2001-3 Patrick Mochel
5 * Copyright (c) 2007 SUSE Linux Products GmbH
6 * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
7 *
8 * This file is released under the GPLv2.
9 */
10
Tejun Heoae6621b2013-11-28 14:54:31 -050011#ifndef __SYSFS_INTERNAL_H
12#define __SYSFS_INTERNAL_H
David P. Quigleyddd29ec2009-09-09 14:25:37 -040013
Tejun Heoae6621b2013-11-28 14:54:31 -050014#include <linux/sysfs.h>
Tejun Heofb6896d2007-06-14 04:27:24 +090015
Tejun Heo59f69012007-09-20 16:05:10 +090016/*
17 * mount.c
18 */
Tejun Heo324a56e2013-12-11 14:11:53 -050019extern struct kernfs_node *sysfs_root_kn;
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Tejun Heo59f69012007-09-20 16:05:10 +090021/*
22 * dir.c
23 */
Tejun Heo0cae60f2013-10-30 10:28:36 -040024extern spinlock_t sysfs_symlink_target_lock;
Tejun Heo59f69012007-09-20 16:05:10 +090025
Tejun Heo324a56e2013-12-11 14:11:53 -050026void sysfs_warn_dup(struct kernfs_node *parent, const char *name);
Tejun Heo59f69012007-09-20 16:05:10 +090027
Tejun Heo59f69012007-09-20 16:05:10 +090028/*
Tejun Heo59f69012007-09-20 16:05:10 +090029 * file.c
30 */
Tejun Heo324a56e2013-12-11 14:11:53 -050031int sysfs_add_file(struct kernfs_node *parent,
Tejun Heoa7dc66d2013-11-28 14:54:23 -050032 const struct attribute *attr, bool is_bin);
Tejun Heo324a56e2013-12-11 14:11:53 -050033int sysfs_add_file_mode_ns(struct kernfs_node *parent,
Tejun Heoa7dc66d2013-11-28 14:54:23 -050034 const struct attribute *attr, bool is_bin,
Tejun Heo58292cbe2013-09-11 22:29:04 -040035 umode_t amode, const void *ns);
Tejun Heo73d97142013-10-01 17:42:07 -040036
Tejun Heo59f69012007-09-20 16:05:10 +090037/*
Tejun Heo59f69012007-09-20 16:05:10 +090038 * symlink.c
39 */
Tejun Heo324a56e2013-12-11 14:11:53 -050040int sysfs_create_link_sd(struct kernfs_node *kn, struct kobject *target,
Rafael J. Wysocki0bb8f3d2013-01-25 21:51:13 +010041 const char *name);
Tejun Heoae6621b2013-11-28 14:54:31 -050042
43#endif /* __SYSFS_INTERNAL_H */