120 LOG_ERR(
"failed to init const directory\n");
128 LOG_ERR(
"failed to init one file\n");
137 LOG_ERR(
"failed to init zero file\n");
147 LOG_ERR(
"failed to init null file\n");
uint64_t _module_procedure(const module_event_t *event)
dentry_t * devfs_dir_new(dentry_t *parent, const char *name, const inode_ops_t *inodeOps, void *private)
Create a new directory inside a mounted devfs instance.
dentry_t * devfs_file_new(dentry_t *parent, const char *name, const inode_ops_t *inodeOps, const file_ops_t *fileOps, void *private)
Create a new file inside a mounted devfs instance.
#define LOG_ERR(format,...)
void * vmm_alloc(space_t *space, void *virtAddr, size_t length, pml_flags_t pmlFlags, vmm_alloc_flags_t allocFlags)
Allocates and maps virtual memory in a given address space.
@ VMM_ALLOC_OVERWRITE
If any page is already mapped, overwrite the mapping.
#define MODULE_INFO(_name, _author, _description, _version, _licence, _deviceTypes)
Macro to define module information.
process_t * sched_process(void)
Retrieves the process of the currently running thread.
#define UNREF(ptr)
Decrement reference count.
#define UNUSED(x)
Mark a variable as unused.
#define NULL
Pointer error value.
#define ERR
Integer error value.
static dentry_t * constDir
static uint64_t const_one_read(file_t *file, void *buffer, size_t count, size_t *offset)
static uint64_t const_null_write(file_t *file, const void *buffer, size_t count, size_t *offset)
static file_ops_t zeroOps
static dentry_t * zeroFile
static void * const_one_mmap(file_t *file, void *addr, size_t length, size_t *offset, pml_flags_t flags)
static void * const_zero_mmap(file_t *file, void *addr, size_t length, size_t *offset, pml_flags_t flags)
static void const_deinit(void)
static uint64_t const_init(void)
static uint64_t const_zero_read(file_t *file, void *buffer, size_t count, size_t *offset)
static dentry_t * oneFile
static dentry_t * nullFile
static uint64_t const_null_read(file_t *file, void *buffer, size_t count, size_t *offset)
static file_ops_t nullOps
EFI_PHYSICAL_ADDRESS buffer
static const path_flag_t flags[]
_PUBLIC void * memset(void *s, int c, size_t n)
Directory entry structure.
File operations structure.
size_t(* read)(file_t *file, void *buffer, size_t count, size_t *offset)
A entry in a page table without a specified address or callback ID.