|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "initrd.h"#include "hal/cpu/paging.h"#include "init/init.h"#include "libk/oct2bin.h"#include <spinlock.h>#include <vector.h>#include "type.h"#include "vfs/cache.h"#include "vfs/dentry.h"#include "vfs/enum.h"#include "vfs/filesystem.h"#include <vfs/vfs.h>#include <vfs/vnode.h>#include <libk/fs/tar.h>#include <libk/serial.h>#include <str.h>#include <memory/kalloc.h>#include <memory/memory_utils.h>#include <memory/phys_base_allocator.h>#include <memory/slab.h>#include <memory/vm_manager.h>#include <autoconf.h>Go to the source code of this file.
Data Structures | |
| struct | initrd_internal_data |
| struct | initrd_internal_vnode_data |
Functions | |
| static void | LoadIntoVfs (dentry_ptr dentry) |
| filesystem_t * | initrd_fs_impl () |
| INIT (initrd) | |
| static int | initrd_read (vnode_t *vnode, void *buf, size_t len, size_t offset) |
| __attribute__ ((used, visibility("default"), section(".export"))) | |
| This function handles memory allocation for a new dentry using the slab allocator. | |
Variables | |
| struct slab_cache * | initrd_internal_vnode_data_cache = 0 |
| static struct initrd_internal_data | __initrd_data |
| __attribute__ | ( | (used, visibility("default"), section(".export")) | ) |
This function handles memory allocation for a new dentry using the slab allocator.
It also links the dentry to its corresponding VNode (if provided).
| name | The name of the file or directory. |
| vnode | Pointer to the associated VNode (inode data). Pass NULL if the VNode is not yet available. |
Definition at line 99 of file initrd.c.
References __initrd_data, base, kstring::c_str, create_and_attach_vnode(), CREATE_MISSING_ENTRY, data, header, initrd_read(), kalloc(), KERNEL_API, LOG2_INFO, LOG_DEBUG, LOG_ERROR, LOG_WARN, memcopy(), dentry::name, NULL, offset, vnode::ops, vnode::permission, print_dentry_tree(), vops_file_t::read, resolve_dentry(), size, vnode::size, strncmp(), vnode::type, VFS_OK, dentry::vnode, vnode::vnode_private, VNODE_TYPE_DIR, and VNODE_TYPE_FILE.
| INIT | ( | initrd | ) |
Definition at line 46 of file initrd.c.
References __initrd_data, BLOCK_SIZE, kstring::c_str, create_and_attach_vnode(), LoadIntoVfs(), LOG_DEBUG, LOG_INFO, dentry::name, offset, paging_get_highest_page_map(), paging_reload(), vnode::permission, initrd_module::size, initrd_module::start, VIRT2PHYS, dentry::vnode, VNODE_TYPE_DIR, vxMultipleMmap(), and vxnamei().
| filesystem_t * initrd_fs_impl | ( | ) |
Definition at line 88 of file initrd.c.
References __initrd_data, addr, data, len, memcopy(), offset, and vnode::vnode_private.
Referenced by __attribute__().
|
static |
Referenced by INIT().
|
static |
Definition at line 41 of file initrd.c.
Referenced by __attribute__(), INIT(), and initrd_read().
| struct slab_cache* initrd_internal_vnode_data_cache = 0 |