Refactor: Move Filesystem.h and FuseErrnoException.h to fuse package

This commit is contained in:
Sebastian Messmer 2014-11-28 14:46:45 +01:00
parent 74cf914f1e
commit 3af17f24d9
5 changed files with 13 additions and 13 deletions

View File

@ -3,7 +3,7 @@
#include "CryDir.h" #include "CryDir.h"
#include "CryFile.h" #include "CryFile.h"
#include "fspp/impl/FuseErrnoException.h" #include "fspp/fuse/FuseErrnoException.h"
using std::unique_ptr; using std::unique_ptr;
@ -11,7 +11,7 @@ using std::unique_ptr;
using std::make_unique; using std::make_unique;
//TODO Get rid of this in favor of exception hierarchy //TODO Get rid of this in favor of exception hierarchy
using fspp::CHECK_RETVAL; using fspp::fuse::CHECK_RETVAL;
namespace cryfs { namespace cryfs {
@ -29,7 +29,7 @@ unique_ptr<fspp::Node> CryDevice::Load(const bf::path &path) {
return make_unique<CryFile>(this, path); return make_unique<CryFile>(this, path);
} }
throw fspp::FuseErrnoException(ENOENT); throw fspp::fuse::FuseErrnoException(ENOENT);
} }
void CryDevice::statfs(const bf::path &path, struct statvfs *fsstat) { void CryDevice::statfs(const bf::path &path, struct statvfs *fsstat) {

View File

@ -5,12 +5,12 @@
#include <fcntl.h> #include <fcntl.h>
#include <dirent.h> #include <dirent.h>
#include "fspp/impl/FuseErrnoException.h" #include "fspp/fuse/FuseErrnoException.h"
#include "CryDevice.h" #include "CryDevice.h"
#include "CryFile.h" #include "CryFile.h"
//TODO Get rid of this in favor of exception hierarchy //TODO Get rid of this in favor of exception hierarchy
using fspp::CHECK_RETVAL; using fspp::fuse::CHECK_RETVAL;
namespace bf = boost::filesystem; namespace bf = boost::filesystem;
@ -54,7 +54,7 @@ void CryDir::rmdir() {
unique_ptr<vector<string>> CryDir::children() const { unique_ptr<vector<string>> CryDir::children() const {
DIR *dir = ::opendir(base_path().c_str()); DIR *dir = ::opendir(base_path().c_str());
if (dir == nullptr) { if (dir == nullptr) {
throw fspp::FuseErrnoException(errno); throw fspp::fuse::FuseErrnoException(errno);
} }
// Set errno=0 so we can detect whether it changed later // Set errno=0 so we can detect whether it changed later
@ -71,7 +71,7 @@ unique_ptr<vector<string>> CryDir::children() const {
if (errno != 0) { if (errno != 0) {
int readdir_errno = errno; int readdir_errno = errno;
::closedir(dir); ::closedir(dir);
throw fspp::FuseErrnoException(readdir_errno); throw fspp::fuse::FuseErrnoException(readdir_errno);
} }
int retval = ::closedir(dir); int retval = ::closedir(dir);
CHECK_RETVAL(retval); CHECK_RETVAL(retval);

View File

@ -2,12 +2,12 @@
#include "CryDevice.h" #include "CryDevice.h"
#include "CryOpenFile.h" #include "CryOpenFile.h"
#include "fspp/impl/FuseErrnoException.h" #include "fspp/fuse/FuseErrnoException.h"
namespace bf = boost::filesystem; namespace bf = boost::filesystem;
//TODO Get rid of this in favor of exception hierarchy //TODO Get rid of this in favor of exception hierarchy
using fspp::CHECK_RETVAL; using fspp::fuse::CHECK_RETVAL;
using std::unique_ptr; using std::unique_ptr;
using std::make_unique; using std::make_unique;

View File

@ -3,12 +3,12 @@
#include <sys/time.h> #include <sys/time.h>
#include "CryDevice.h" #include "CryDevice.h"
#include "fspp/impl/FuseErrnoException.h" #include "fspp/fuse/FuseErrnoException.h"
namespace bf = boost::filesystem; namespace bf = boost::filesystem;
//TODO Get rid of this in favor of an exception hierarchy //TODO Get rid of this in favor of an exception hierarchy
using fspp::CHECK_RETVAL; using fspp::fuse::CHECK_RETVAL;
namespace cryfs { namespace cryfs {

View File

@ -4,12 +4,12 @@
#include <fcntl.h> #include <fcntl.h>
#include "CryDevice.h" #include "CryDevice.h"
#include "fspp/impl/FuseErrnoException.h" #include "fspp/fuse/FuseErrnoException.h"
namespace bf = boost::filesystem; namespace bf = boost::filesystem;
//TODO Get rid of this in favor of a exception hierarchy //TODO Get rid of this in favor of a exception hierarchy
using fspp::CHECK_RETVAL; using fspp::fuse::CHECK_RETVAL;
namespace cryfs { namespace cryfs {