2015-02-17 01:02:15 +01:00
|
|
|
#include <messmer/blockstore/implementations/ondisk/OnDiskBlockStore.h>
|
2015-04-08 14:15:11 +02:00
|
|
|
#include <messmer/blockstore/implementations/inmemory/InMemoryBlockStore.h>
|
|
|
|
#include <messmer/blockstore/implementations/inmemory/InMemoryBlock.h>
|
2014-11-04 02:32:06 +01:00
|
|
|
#include <cmath>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
|
2015-02-17 01:02:15 +01:00
|
|
|
#include "messmer/fspp/fuse/Fuse.h"
|
|
|
|
#include "messmer/fspp/impl/FilesystemImpl.h"
|
|
|
|
#include "CryDevice.h"
|
2015-06-16 18:20:31 +02:00
|
|
|
#include "CryConfigLoader.h"
|
2014-11-15 16:33:24 +01:00
|
|
|
|
|
|
|
namespace bf = boost::filesystem;
|
2014-11-04 02:54:23 +01:00
|
|
|
|
2014-12-09 17:19:59 +01:00
|
|
|
using blockstore::ondisk::OnDiskBlockStore;
|
2015-04-08 14:15:11 +02:00
|
|
|
using blockstore::inmemory::InMemoryBlockStore;
|
2014-12-07 08:57:23 +01:00
|
|
|
|
2015-07-21 18:32:40 +02:00
|
|
|
using cpputils::make_unique_ref;
|
2014-12-07 08:57:23 +01:00
|
|
|
|
2014-11-04 17:40:31 +01:00
|
|
|
int main (int argc, char *argv[])
|
2014-11-04 02:32:06 +01:00
|
|
|
{
|
2015-07-21 18:22:03 +02:00
|
|
|
auto blockStore = make_unique_ref<OnDiskBlockStore>(bf::path("/home/heinzi/cryfstest/root"));
|
2015-06-16 18:20:31 +02:00
|
|
|
auto config = cryfs::CryConfigLoader::loadOrCreate(bf::path("/home/heinzi/cryfstest/config.json"));
|
2014-12-09 17:19:59 +01:00
|
|
|
cryfs::CryDevice device(std::move(config), std::move(blockStore));
|
2014-11-16 00:05:28 +01:00
|
|
|
fspp::FilesystemImpl fsimpl(&device);
|
|
|
|
fspp::fuse::Fuse fuse(&fsimpl);
|
2014-11-04 17:40:31 +01:00
|
|
|
fuse.run(argc, argv);
|
2014-11-04 02:32:06 +01:00
|
|
|
return 0;
|
|
|
|
}
|