2011-02-19 18:06:42 +00:00
|
|
|
#ifndef __DISKCOPY42IMAGE_H__
|
|
|
|
#define __DISKCOPY42IMAGE_H__
|
|
|
|
|
|
|
|
#include <Device/BlockDevice.h>
|
|
|
|
#include <Device/DiskImage.h>
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
namespace Device {
|
|
|
|
|
|
|
|
class DiskCopy42Image : public DiskImage {
|
|
|
|
public:
|
|
|
|
virtual ~DiskCopy42Image();
|
|
|
|
|
2011-02-28 05:04:30 +00:00
|
|
|
static BlockDevicePointer Create(const char *name, size_t blocks);
|
|
|
|
static BlockDevicePointer Create(const char *name, size_t blocks, const char *vname);
|
2011-02-19 18:06:42 +00:00
|
|
|
|
2011-02-28 05:04:30 +00:00
|
|
|
static BlockDevicePointer Open(MappedFile *);
|
2011-02-19 18:06:42 +00:00
|
|
|
|
|
|
|
static uint32_t Checksum(void *data, size_t size);
|
|
|
|
|
2011-03-08 03:20:14 +00:00
|
|
|
static bool Validate(MappedFile *, const std::nothrow_t &);
|
|
|
|
static bool Validate(MappedFile *);
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-19 18:06:42 +00:00
|
|
|
virtual void write(unsigned block, const void *bp);
|
|
|
|
|
|
|
|
|
2011-02-21 22:47:56 +00:00
|
|
|
virtual BlockCachePointer createBlockCache();
|
2011-02-19 18:06:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
DiskCopy42Image();
|
|
|
|
|
|
|
|
DiskCopy42Image(MappedFile *);
|
|
|
|
bool _changed;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|