feature (drive manager): added device pointer to drive struct
This commit is contained in:
parent
0bed26ff26
commit
7f711d853e
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue