[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.
This commit is contained in:
parent
bed685af65
commit
083ed52ddd
7 changed files with 44 additions and 45 deletions
|
|
@ -1,11 +1,12 @@
|
|||
#include "fs/ext2/ext2_block_reader.h"
|
||||
|
||||
glcr::ErrorOr<Ext2BlockReader> Ext2BlockReader::Init(
|
||||
glcr::ErrorOr<glcr::SharedPtr<Ext2BlockReader>> Ext2BlockReader::Init(
|
||||
ScopedDenaliClient&& denali) {
|
||||
// Read 1024 bytes from 1024 offset.
|
||||
// FIXME: Don't assume 512 byte sectors somehow.
|
||||
ASSIGN_OR_RETURN(MappedMemoryRegion superblock, denali.ReadSectors(2, 2));
|
||||
return Ext2BlockReader(glcr::Move(denali), superblock);
|
||||
return glcr::SharedPtr<Ext2BlockReader>(
|
||||
new Ext2BlockReader(glcr::Move(denali), superblock));
|
||||
}
|
||||
|
||||
Superblock* Ext2BlockReader::GetSuperblock() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue