2007-09-20 17:31:38 +09: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>
|
|
|
|
*
|
|
|
|
* This file is released under the GPLv2.
|
|
|
|
*/
|
|
|
|
|
2013-11-28 14:54:31 -05:00
|
|
|
#ifndef __SYSFS_INTERNAL_H
|
|
|
|
#define __SYSFS_INTERNAL_H
|
2009-09-09 14:25:37 -04:00
|
|
|
|
2013-11-28 14:54:31 -05:00
|
|
|
#include "../kernfs/kernfs-internal.h"
|
|
|
|
#include <linux/sysfs.h>
|
2007-06-14 04:27:24 +09:00
|
|
|
|
2007-09-20 16:05:10 +09:00
|
|
|
/*
|
|
|
|
* mount.c
|
|
|
|
*/
|
2010-05-03 16:23:15 -05:00
|
|
|
|
2010-03-30 11:31:24 -07:00
|
|
|
struct sysfs_super_info {
|
2013-11-28 14:54:37 -05:00
|
|
|
/*
|
|
|
|
* Each sb is associated with one namespace tag, currently the network
|
|
|
|
* namespace of the task which mounted this sysfs instance. If multiple
|
|
|
|
* tags become necessary, make the following an array and compare
|
|
|
|
* sysfs_dirent tag against every entry.
|
|
|
|
*/
|
|
|
|
const void *ns;
|
2010-03-30 11:31:24 -07:00
|
|
|
};
|
|
|
|
#define sysfs_info(SB) ((struct sysfs_super_info *)(SB->s_fs_info))
|
2007-06-14 04:27:25 +09:00
|
|
|
extern struct sysfs_dirent sysfs_root;
|
2006-12-06 20:33:20 -08:00
|
|
|
extern struct kmem_cache *sysfs_dir_cachep;
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-09-20 16:05:10 +09:00
|
|
|
/*
|
|
|
|
* dir.c
|
|
|
|
*/
|
2013-10-30 10:28:36 -04:00
|
|
|
extern spinlock_t sysfs_symlink_target_lock;
|
2007-09-20 16:05:10 +09:00
|
|
|
|
2013-10-24 11:49:11 -04:00
|
|
|
void sysfs_warn_dup(struct sysfs_dirent *parent, const char *name);
|
2007-09-20 16:05:10 +09:00
|
|
|
|
|
|
|
/*
|
|
|
|
* file.c
|
|
|
|
*/
|
|
|
|
int sysfs_add_file(struct sysfs_dirent *dir_sd,
|
2013-11-28 14:54:23 -05:00
|
|
|
const struct attribute *attr, bool is_bin);
|
2013-09-11 22:29:04 -04:00
|
|
|
int sysfs_add_file_mode_ns(struct sysfs_dirent *dir_sd,
|
2013-11-28 14:54:23 -05:00
|
|
|
const struct attribute *attr, bool is_bin,
|
2013-09-11 22:29:04 -04:00
|
|
|
umode_t amode, const void *ns);
|
2013-10-01 17:42:07 -04:00
|
|
|
|
2007-09-20 16:05:10 +09:00
|
|
|
/*
|
|
|
|
* symlink.c
|
|
|
|
*/
|
2013-01-25 21:51:13 +01:00
|
|
|
int sysfs_create_link_sd(struct sysfs_dirent *sd, struct kobject *target,
|
|
|
|
const char *name);
|
2013-11-28 14:54:31 -05:00
|
|
|
|
|
|
|
#endif /* __SYSFS_INTERNAL_H */
|