Go to the source code of this file.
|
#define | SYSFS_RO_ITEM(_name, _show_fn) |
|
#define | SYSFS_RW_ITEM(_name, _show_fn, _store_fn) |
|
#define | SYSFS_WO_ITEM(_name, _store_fn) |
|
#define | SYSFS_MEM_ITEM(_name, _mmap_fn, _munmap_fn) |
|
#define | SYSFS_DYN_ITEMS(_name, _iterate_fn, _lookup_fn) |
|
#define | SYSFS_DYN_DIR(_name, _iterate_fn, _lookup_fn, _create_fn) |
|
#define | SYSFS_ITEM_RO_PRINTF(name, fmt, ...) |
|
#define | SYSFS_ITEM_RO_STRING(name, value) |
|
#define | SYSFS_DEFINE_DIR(sysfs_name, sysfs_items) |
|
◆ SYSFS_RO_ITEM
#define SYSFS_RO_ITEM |
( |
| _name, |
|
|
| _show_fn ) |
◆ SYSFS_RW_ITEM
#define SYSFS_RW_ITEM |
( |
| _name, |
|
|
| _show_fn, |
|
|
| _store_fn ) |
Value:{ .name = _name, .type =
SYSFS_RW, .show = _show_fn, .store = _store_fn }
Definition at line 49 of file sysfs.h.
◆ SYSFS_WO_ITEM
#define SYSFS_WO_ITEM |
( |
| _name, |
|
|
| _store_fn ) |
Value:{ .name = _name, .type =
SYSFS_WO, .store = _store_fn }
Definition at line 50 of file sysfs.h.
◆ SYSFS_MEM_ITEM
#define SYSFS_MEM_ITEM |
( |
| _name, |
|
|
| _mmap_fn, |
|
|
| _munmap_fn ) |
Value:{ .name = _name, .type =
SYSFS_MEM, .mem.mmap = _mmap_fn, .mem.munmap = _munmap_fn }
@ SYSFS_MEM
memory-backed file
Definition at line 51 of file sysfs.h.
◆ SYSFS_DYN_ITEMS
#define SYSFS_DYN_ITEMS |
( |
| _name, |
|
|
| _iterate_fn, |
|
|
| _lookup_fn ) |
Value:{ .type =
SYSFS_DYN, .dyn.iterate = _iterate_fn, .dyn.lookup = _lookup_fn }
@ SYSFS_DYN
dynamic directory items
Definition at line 52 of file sysfs.h.
◆ SYSFS_DYN_DIR
#define SYSFS_DYN_DIR |
( |
| _name, |
|
|
| _iterate_fn, |
|
|
| _lookup_fn, |
|
|
| _create_fn ) |
Value:{ .type =
SYSFS_DYN, .dyn.iterate = _iterate_fn, .dyn.lookup = _lookup_fn, .dyn.create = _create_fn }
Definition at line 53 of file sysfs.h.
◆ SYSFS_ITEM_RO_PRINTF
#define SYSFS_ITEM_RO_PRINTF |
( |
| name, |
|
|
| fmt, |
|
|
| ... ) |
Value:
{ \
sysfs_printf(file,
fmt, ##__VA_ARGS__); \
return true; \
}
Definition at line 56 of file sysfs.h.
◆ SYSFS_ITEM_RO_STRING
#define SYSFS_ITEM_RO_STRING |
( |
| name, |
|
|
| value ) |
Value:
#define SYSFS_ITEM_RO_PRINTF(name, fmt,...)
Definition at line 63 of file sysfs.h.
◆ SYSFS_DEFINE_DIR
#define SYSFS_DEFINE_DIR |
( |
| sysfs_name, |
|
|
| sysfs_items ) |
Value:
.name = #sysfs_name, \
.items = sysfs_items, \
._dynamic_items =
LIST_HEAD_INIT(__sysfs_##sysfs_name._dynamic_items), \
}
#define LIST_HEAD_INIT(container)
#define LIST_NODE_INIT(container)
#define MOS_ARRAY_SIZE(x)
Definition at line 65 of file sysfs.h.
◆ sysfs_file_t
typedef struct _sysfs_file sysfs_file_t |
◆ sysfs_item_type_t
Enumerator |
---|
_SYSFS_INVALID | |
SYSFS_RO | |
SYSFS_RW | |
SYSFS_WO | |
SYSFS_MEM | memory-backed file
|
SYSFS_DYN | dynamic directory items
|
Definition at line 10 of file sysfs.h.
◆ sysfs_register()
Register a sysfs directory.
- Parameters
-
entry | the sysfs directory to register |
Definition at line 48 of file sysfs.c.
◆ sysfs_register_file()
◆ sysfs_register_root_file()
Register an entry in the sysfs root directory.
- Parameters
-
item | the sysfs item to register |
Definition at line 105 of file sysfs.h.
Referenced by mm_sysfs_init(), and MOS_INIT().
◆ sysfs_file_set_data()
◆ sysfs_file_get_data()
◆ sysfs_file_get_item()
◆ sysfs_create_inode()
◆ sysfs_printf()
Definition at line 73 of file sysfs.c.
Referenced by _process_do_print(), _thread_do_print(), init_sysfs_argv(), ipc_dump_name_waitlist(), ipc_sysfs_dump_name_waitlist(), ipc_sysfs_servers(), mmstat_sysfs_pagetable_show(), mmstat_sysfs_phyframe_stat_show(), mmstat_sysfs_stat(), mmstat_sysfs_vmaps_show(), process_sysfs_vmap_stat(), slab_sysfs_slabinfo(), vfs_sysfs_dentry_stats_stat_receiver(), vfs_sysfs_filesystems(), and vfs_sysfs_mountpoints().
◆ sysfs_put_data()