2023-07-05 22:56:08 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <denali/denali_client.h>
|
|
|
|
#include <glacier/memory/move.h>
|
|
|
|
|
|
|
|
#include "fs/ext2/ext2.h"
|
2023-07-05 23:19:25 -07:00
|
|
|
#include "fs/ext2/ext2_block_reader.h"
|
2023-07-05 22:56:08 -07:00
|
|
|
|
|
|
|
class Ext2Driver {
|
|
|
|
public:
|
2023-07-05 23:19:25 -07:00
|
|
|
static glcr::ErrorOr<Ext2Driver> Init(ScopedDenaliClient&& denali);
|
2023-07-05 22:56:08 -07:00
|
|
|
|
|
|
|
glcr::ErrorCode ProbePartition();
|
|
|
|
|
|
|
|
private:
|
2023-07-05 23:19:25 -07:00
|
|
|
Ext2BlockReader ext2_reader_;
|
|
|
|
|
|
|
|
Ext2Driver(Ext2BlockReader&& reader) : ext2_reader_(glcr::Move(reader)) {}
|
2023-07-05 22:56:08 -07:00
|
|
|
};
|