acadia/sys/victoriafalls/fs/ext2/inode_table.h
Drew Galbraith 083ed52ddd [Victoria Falls] Print only the root directory information.
Move the InodeTable creating to the Init function which (somewhat)
requires us to stop taking the Ext2BlockReader as a reference (the reference
from the Init function goes out of scope). Make the Ext2BlockReader Init
function return a shared ptr by default.
2023-08-01 10:39:26 -07:00

22 lines
516 B
C++

#pragma once
#include <glacier/container/vector.h>
#include <stdint.h>
#include "fs/ext2/ext2_block_reader.h"
class InodeTable {
public:
InodeTable(const glcr::SharedPtr<Ext2BlockReader>& driver,
BlockGroupDescriptor* bgdt);
glcr::ErrorOr<Inode*> GetInode(uint32_t inode_num);
private:
glcr::SharedPtr<Ext2BlockReader> ext2_reader_;
BlockGroupDescriptor* bgdt_;
glcr::Vector<MappedMemoryRegion> inode_tables_;
glcr::ErrorOr<Inode*> GetRootOfInodeTable(uint64_t block_group_num);
};