thin dump now does something useful

This commit is contained in:
Joe Thornber
2011-10-10 14:10:30 +01:00
parent 16539b59ff
commit d255180e37
12 changed files with 342 additions and 17 deletions

View File

@@ -57,7 +57,8 @@ block_manager<BlockSize>::block_manager(std::string const &path, block_address n
superblock_count_(0),
ordinary_count_(0)
{
fd_ = ::open(path.c_str(), O_RDWR | O_CREAT, 0666);
//fd_ = ::open(path.c_str(), O_RDWR | O_CREAT, 0666);
fd_ = ::open(path.c_str(), O_RDONLY, 0666);
if (fd_ < 0)
throw std::runtime_error("couldn't open file");
}