24 return fb->
mmap(
fb, addr, length, offset, flags);
#define MAX_NAME
Maximum length of names.
static atomic_uint64_t newId
static uint64_t fb_info_read(file_t *file, void *buffer, uint64_t count, uint64_t *offset)
static void * fb_buffer_mmap(file_t *file, void *addr, uint64_t length, uint64_t *offset, pml_flags_t flags)
static file_ops_t infoOps
static void fb_dir_cleanup(inode_t *inode)
static inode_ops_t dirInodeOps
static file_ops_t bufferOps
void fb_free(fb_t *fb)
Free and deinitialize a framebuffer structure.
void *(* fb_mmap_t)(fb_t *, void *, uint64_t, uint64_t *, pml_flags_t)
Framebuffer mmap callback type.
fb_t * fb_new(const fb_info_t *info, fb_mmap_t mmap)
Allocate and initialize a framebuffer structure.
#define BUFFER_READ(buffer, count, offset, src, size)
Helper macros for implementing file operations dealing with simple buffers.
void log_screen_disable(void)
Disable logging to the screen.
#define DEREF(ptr)
Decrement reference count.
#define EINVAL
Invalid argument.
#define errno
Error number variable.
void * mmap(fd_t fd, void *address, uint64_t length, prot_t prot)
System call to map memory from a file.
#define NULL
Pointer error value.
EFI_PHYSICAL_ADDRESS buffer
#define ATOMIC_VAR_INIT(value)
#define atomic_fetch_add(object, operand)
_PUBLIC int snprintf(char *_RESTRICT s, size_t n, const char *_RESTRICT format,...)
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
_PUBLIC void * memcpy(void *_RESTRICT s1, const void *_RESTRICT s2, size_t n)
Directory entry structure.
File operations structure.
uint64_t(* read)(file_t *file, void *buffer, uint64_t count, uint64_t *offset)
void *(* mmap)(file_t *file, void *address, uint64_t length, uint64_t *offset, pml_flags_t flags)
void(* cleanup)(inode_t *inode)
A entry in a page table without a specified address or callback ID.
dentry_t * sysfs_dir_new(dentry_t *parent, const char *name, const inode_ops_t *inodeOps, void *private)
Create a new directory inside a mounted SysFS instance.
dentry_t * sysfs_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 SysFS instance.