MOS Source Code
Loading...
Searching...
No Matches
sysfs_item_t Struct Reference

#include <sysfs.h>

Public Attributes

const char * name
 
sysfs_item_type_t type
 
bool(* show )(sysfs_file_t *file)
 
size_t(* store )(sysfs_file_t *file, const char *buf, size_t count, off_t offset)
 
ino_t ino
 
union { 
 
   struct { 
 
      bool(*   mmap )(sysfs_file_t *file, vmap_t
         *vmap, off_t offset) 
 
      bool(*   munmap )(sysfs_file_t *file, vmap_t
         *vmap, bool *unmapped) 
 
      size_t   size 
 
   }   mem 
 
   struct { 
 
         as_linked_list 
 
      void(*   iterate )(struct _sysfs_item *item,
          dentry_t *dentry,
          vfs_listdir_state_t
         *iterator_state,
          dentry_iterator_op op) 
 
      bool(*   lookup )(inode_t *parent_dir,
          dentry_t *dentry) 
 
      bool(*   create )(inode_t *parent_dir,
          dentry_t *dentry, file_type_t
         type, file_perm_t perm) 
 
   }   dyn 
 
};  
 

Detailed Description

Definition at line 20 of file sysfs.h.

Member Data Documentation

◆ name

const char* name

◆ type

◆ show

bool(* show) (sysfs_file_t *file)

Definition at line 24 of file sysfs.h.

Referenced by sysfs_file_ensure_ready().

◆ store

size_t(* store) (sysfs_file_t *file, const char *buf, size_t count, off_t offset)

Definition at line 25 of file sysfs.h.

Referenced by sysfs_fops_write().

◆ ino

ino_t ino

Definition at line 26 of file sysfs.h.

Referenced by sysfs_iops_iterate_dir(), and sysfs_register_file().

◆ mmap

bool(* mmap) (sysfs_file_t *file, vmap_t *vmap, off_t offset)

Definition at line 32 of file sysfs.h.

Referenced by register_sysfs_acpi_node(), register_sysfs_acpi_rsdp(), and sysfs_fops_mmap().

◆ munmap

bool(* munmap) (sysfs_file_t *file, vmap_t *vmap, bool *unmapped)

Definition at line 33 of file sysfs.h.

Referenced by register_sysfs_acpi_node(), register_sysfs_acpi_rsdp(), and sysfs_fops_munmap().

◆ size

◆ [struct]

◆ as_linked_list

as_linked_list

Definition at line 39 of file sysfs.h.

◆ iterate

void(* iterate) (struct _sysfs_item *item, dentry_t *dentry, vfs_listdir_state_t *iterator_state, dentry_iterator_op op)

Definition at line 40 of file sysfs.h.

Referenced by sysfs_iops_iterate_dir(), and sysfs_register_file().

◆ lookup

bool(* lookup) (inode_t *parent_dir, dentry_t *dentry)

Definition at line 41 of file sysfs.h.

Referenced by sysfs_iops_lookup().

◆ create

bool(* create) (inode_t *parent_dir, dentry_t *dentry, file_type_t type, file_perm_t perm)

Definition at line 42 of file sysfs.h.

Referenced by sysfs_iops_create().

◆ [struct]

◆ [union]

union { ... }

The documentation for this struct was generated from the following file: