[all tools] Factor out open_bm() and open_tm.

Many duplicates of this code.
This commit is contained in:
Joe Thornber
2017-10-05 11:53:40 +01:00
parent 924a996fa7
commit 3c761e6822
11 changed files with 44 additions and 122 deletions

View File

@ -2,6 +2,7 @@
#define THIN_FILE_UTILS_H
#include "persistent-data/block.h"
#include "persistent-data/transaction_manager.h"
#include <string>
@ -14,6 +15,11 @@ namespace persistent_data {
block_manager<>::ptr open_bm(std::string const &dev_path,
block_manager<>::mode m, bool excl = true);
block_manager<>::ptr open_bm(std::string const &path);
transaction_manager::ptr open_tm(block_manager<>::ptr bm,
block_address superblock_location);
}
//----------------------------------------------------------------