1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
15 #include <asm/atomic.h>
22 struct module * owner;
26 struct attribute_group {
28 struct attribute ** attrs;
31 #define __ATTR(_name,_mode,_show,_store) { .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, .show = _show, .store = _store, }
33 #define __ATTR_RO(_name) { .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, .show = _name##_show, }
35 #define __ATTR_NULL { .attr = { .name = NULL } }
37 #define attr_name(_attr) (_attr).attr.name
39 struct vm_area_struct;
41 struct bin_attribute {
42 struct attribute attr;
45 ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
46 ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
47 int (*mmap)(struct kobject *, struct bin_attribute *attr,
48 struct vm_area_struct *vma);
52 ssize_t (*show)(struct kobject *, struct attribute *,char *);
53 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
58 struct list_head s_sibling;
59 struct list_head s_children;
63 struct dentry * s_dentry;
64 struct iattr * s_iattr;
68 #define SYSFS_ROOT 0x0001
69 #define SYSFS_DIR 0x0002
70 #define SYSFS_KOBJ_ATTR 0x0004
71 #define SYSFS_KOBJ_BIN_ATTR 0x0008
72 #define SYSFS_KOBJ_DEVICE 0x0010
73 #define SYSFS_KOBJ_LINK 0x0020
74 #define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_DEVICE | SYSFS_KOBJ_LINK)