|
|
nono 1.7.0
//
// nono
// Copyright (C) 2021 nono project
// Licensed under nono-license.txt
//
//
// ディスクイメージドライバ (生イメージ形式)
//
#pragma once
#include "autofd.h"
#include "diskdriver.h"
class DiskDriverRaw : public DiskImageDriver
{
using inherited = DiskImageDriver;
public:
DiskDriverRaw(const std::string& objname_, const std::string& pathname_);
~DiskDriverRaw() override;
bool Match() override;
bool Attach(std::string& errmsg) override;
bool Open(bool read_only) override;
void Close() override;
bool Read(void *buf, off_t offset, size_t size) override;
bool Write(const void *buf, off_t offset, size_t size) override;
private:
autofd fd {};
};
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.