1/**************************************************************************** 2 **************************************************************************** 3 *** 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. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19#ifndef _SYSFS_H_ 20#define _SYSFS_H_ 21#include <asm/atomic.h> 22struct kobject; 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24struct module; 25struct attribute { 26 const char * name; 27 struct module * owner; 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 mode_t mode; 30}; 31struct attribute_group { 32 const char * name; 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 struct attribute ** attrs; 35}; 36#define __ATTR(_name,_mode,_show,_store) { .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, .show = _show, .store = _store, } 37#define __ATTR_RO(_name) { .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, .show = _name##_show, } 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#define __ATTR_NULL { .attr = { .name = NULL } } 40#define attr_name(_attr) (_attr).attr.name 41struct vm_area_struct; 42struct bin_attribute { 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 struct attribute attr; 45 size_t size; 46 void *private; 47 ssize_t (*read)(struct kobject *, char *, loff_t, size_t); 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 ssize_t (*write)(struct kobject *, char *, loff_t, size_t); 50 int (*mmap)(struct kobject *, struct bin_attribute *attr, 51 struct vm_area_struct *vma); 52}; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54struct sysfs_ops { 55 ssize_t (*show)(struct kobject *, struct attribute *,char *); 56 ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); 57}; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59struct sysfs_dirent { 60 atomic_t s_count; 61 struct list_head s_sibling; 62 struct list_head s_children; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 void * s_element; 65 int s_type; 66 umode_t s_mode; 67 struct dentry * s_dentry; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 struct iattr * s_iattr; 70 atomic_t s_event; 71}; 72#define SYSFS_ROOT 0x0001 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define SYSFS_DIR 0x0002 75#define SYSFS_KOBJ_ATTR 0x0004 76#define SYSFS_KOBJ_BIN_ATTR 0x0008 77#define SYSFS_KOBJ_DEVICE 0x0010 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79#define SYSFS_KOBJ_LINK 0x0020 80#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_DEVICE | SYSFS_KOBJ_LINK) 81#endif 82