diff --git a/src/anbox/common/mount_entry.cpp b/src/anbox/common/mount_entry.cpp index fce7831..3e9d953 100644 --- a/src/anbox/common/mount_entry.cpp +++ b/src/anbox/common/mount_entry.cpp @@ -46,6 +46,16 @@ std::shared_ptr MountEntry::create(const std::shared_ptr return entry; } +std::shared_ptr MountEntry::create(const boost::filesystem::path &target) { + auto entry = std::shared_ptr(new MountEntry(target)); + if (!entry) + return nullptr; + + entry->active_ = true; + + return entry; +} + MountEntry::MountEntry(const boost::filesystem::path &target) : active_{false}, target_{target} {} diff --git a/src/anbox/common/mount_entry.h b/src/anbox/common/mount_entry.h index 5b0be38..cc703e3 100644 --- a/src/anbox/common/mount_entry.h +++ b/src/anbox/common/mount_entry.h @@ -31,6 +31,8 @@ class MountEntry { static std::shared_ptr create(const std::shared_ptr &loop, const boost::filesystem::path &target, const std::string &fs_type = "", unsigned long flags = 0); + static std::shared_ptr create(const boost::filesystem::path &target); + ~MountEntry(); private: