PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
sysfs.h File Reference
#include <kernel/fs/dentry.h>
#include <kernel/fs/vnode.h>
#include <sys/fs.h>
Include dependency graph for sysfs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sysfs_file_desc_t
 Descriptor for batch file creation. More...
 

Macros

#define SYSFS_NAME   "sysfs"
 The name of the system filesystem.
 

Typedefs

typedef struct file file_t
 
typedef struct file_ops file_ops_t
 
typedef struct superblock superblock_t
 
typedef struct superblock_ops superblock_ops_t
 

Functions

void sysfs_init (void)
 Initializes the sysfs and mount an instance at /sys.
 
dentry_tsysfs_dir_new (dentry_t *parent, const char *name, const vnode_ops_t *vnodeOps, void *data)
 Create a new directory inside a mounted sysfs instance.
 
dentry_tsysfs_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_tsysfs_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().
 

Typedef Documentation

◆ file_t

typedef struct file file_t

Definition at line 7 of file sysfs.h.

◆ file_ops_t

typedef struct file_ops file_ops_t

Definition at line 8 of file sysfs.h.

◆ superblock_t

typedef struct superblock superblock_t

Definition at line 10 of file sysfs.h.

◆ superblock_ops_t

typedef struct superblock_ops superblock_ops_t

Definition at line 11 of file sysfs.h.