26#define SYSFS_NAME "sysfs"
77typedef struct sysfs_file_desc
dentry_t * sysfs_symlink_new(dentry_t *parent, const char *name, const vnode_ops_t *vnodeOps, void *data)
Create a new symbolic link inside a mounted sysfs instance.
uint64_t sysfs_files_new(list_t *out, dentry_t *parent, const sysfs_file_desc_t *descs)
Create multiple files in a sysfs directory.
void sysfs_files_free(list_t *files)
Free all files in a list created by sysfs_files_new().
void sysfs_init(void)
Initializes the sysfs and mount an instance at /sys.
dentry_t * sysfs_file_new(dentry_t *parent, const char *name, const vnode_ops_t *vnodeOps, const file_ops_t *fileOps, void *data)
Create a new file inside a mounted sysfs instance.
dentry_t * sysfs_dir_new(dentry_t *parent, const char *name, const vnode_ops_t *vnodeOps, void *data)
Create a new directory inside a mounted sysfs instance.
Directory entry structure.
File operations structure.
Superblock operations structure.
Descriptor for batch file creation.
void * data
Private data to store in the vnode of the file.
const vnode_ops_t * vnodeOps
Vnode operations, can be NULL.
const char * name
Name of the file, NULL marks end of array.
const file_ops_t * fileOps
File operations, can be NULL.
vnode operations structure.
static vnode_ops_t vnodeOps
static file_ops_t fileOps