diff --git a/inc/drivers/drive_manager.h b/inc/drivers/drive_manager.h index c3a9f65..04ccc5f 100644 --- a/inc/drivers/drive_manager.h +++ b/inc/drivers/drive_manager.h @@ -36,6 +36,7 @@ struct drive_T { drive_partition_chunk_T* partitions_chunks; drive_controller_types_E controller_type; void* controller; + void* device; }; struct drive_chunk_T { diff --git a/src/drivers/drive_manager.c b/src/drivers/drive_manager.c index 37a4193..73f211b 100644 --- a/src/drivers/drive_manager.c +++ b/src/drivers/drive_manager.c @@ -1,6 +1,7 @@ // This file is part of noxos and licensed under the MIT open source license #include "drivers/drive_manager.h" +#include "drivers/ahci.h" #include "utils/memory.h" #include "utils/logger.h" @@ -67,6 +68,7 @@ drive_T* drive_manager_add_drive(drive_controller_types_E controller_type, void* drive->partitions_chunks = drive_partition_chunk_alloc(NULL); drive->controller_type = controller_type; drive->controller = controller; + drive->device = device; drive->chunk = chunk; chunk->num_drives += 1; diff --git a/src/drivers/fs/vfs.c b/src/drivers/fs/vfs.c index ce833c7..5bff873 100644 --- a/src/drivers/fs/vfs.c +++ b/src/drivers/fs/vfs.c @@ -291,6 +291,8 @@ void vfs_init(boot_info_T* boot_info) { // unpacking initial ramdisk to '/initrd/' vfs_node_create(g_root_fs.root_node, "initrd", VFS_NODE_MOUNT, &g_ramdisk_fs); vfs_unpack_archive_ustar(&g_ramdisk_fs, boot_info->ramdisk_file->address); + + vfs_node_create(g_root_fs.root_node, "devices", VFS_NODE_DIRECTORY, NULL); } vfs_node_T* vfs_resolve_path(fs_T* filesystem, string_t path) {