diff options
author | Roger Leigh <rleigh@debian.org> | 2013-04-07 20:58:01 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-04-09 22:36:44 +0100 |
commit | a2394ed28bfa35b8e0ea0f74b8f2d5372d48ac15 (patch) | |
tree | 68f9211e1b9460064437ec30460f6f3b06c34096 /lib | |
parent | b9eeb55061318ac16a285f753766473fd4a8dd72 (diff) | |
download | schroot-a2394ed28bfa35b8e0ea0f74b8f2d5372d48ac15.tar.gz |
sbuild: Move chroot-facet-mountable to namespace chroot::facet
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbuild/Makefile.am | 4 | ||||
-rw-r--r-- | lib/sbuild/chroot-facet-mountable.cc | 181 | ||||
-rw-r--r-- | lib/sbuild/chroot-facet-mountable.h | 158 | ||||
-rw-r--r-- | lib/sbuild/chroot-facet-session-clonable.cc | 10 | ||||
-rw-r--r-- | lib/sbuild/chroot/block-device-base.cc | 8 | ||||
-rw-r--r-- | lib/sbuild/chroot/facet/mountable.cc | 192 | ||||
-rw-r--r-- | lib/sbuild/chroot/facet/mountable.h | 164 | ||||
-rw-r--r-- | lib/sbuild/chroot/loopback.cc | 8 | ||||
-rw-r--r-- | lib/sbuild/chroot/lvm-snapshot.cc | 6 |
9 files changed, 374 insertions, 357 deletions
diff --git a/lib/sbuild/Makefile.am b/lib/sbuild/Makefile.am index ac700da3..fb1d5dd0 100644 --- a/lib/sbuild/Makefile.am +++ b/lib/sbuild/Makefile.am @@ -26,7 +26,7 @@ lib_sbuild_public_h_sources = \ lib/sbuild/chroot/directory.h \ lib/sbuild/chroot/directory-base.h \ lib/sbuild/chroot/facet/facet.h \ - lib/sbuild/chroot-facet-mountable.h \ + lib/sbuild/chroot/facet/mountable.h \ lib/sbuild/chroot-facet-personality.h \ lib/sbuild/chroot-facet-session.h \ lib/sbuild/chroot-facet-session-clonable.h \ @@ -110,7 +110,7 @@ lib_sbuild_public_cc_sources = \ lib/sbuild/chroot/custom.cc \ lib/sbuild/chroot/directory.cc \ lib/sbuild/chroot/directory-base.cc \ - lib/sbuild/chroot-facet-mountable.cc \ + lib/sbuild/chroot/facet/mountable.cc \ lib/sbuild/chroot-facet-personality.cc \ lib/sbuild/chroot-facet-session.cc \ lib/sbuild/chroot-facet-session-clonable.cc \ diff --git a/lib/sbuild/chroot-facet-mountable.cc b/lib/sbuild/chroot-facet-mountable.cc deleted file mode 100644 index a3fed8c8..00000000 --- a/lib/sbuild/chroot-facet-mountable.cc +++ /dev/null @@ -1,181 +0,0 @@ -/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org> - * - * schroot is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * schroot is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - * - *********************************************************************/ - -#include <config.h> - -#include <sbuild/chroot/chroot.h> -#include "chroot-facet-mountable.h" -#include "chroot-facet-session.h" - -#include <cassert> - -#include <boost/format.hpp> - -using boost::format; -using std::endl; -using namespace sbuild; - -chroot_facet_mountable::chroot_facet_mountable (): - chroot::facet::facet(), - mount_device(), - mount_options(), - location() -{ -} - -chroot_facet_mountable::~chroot_facet_mountable () -{ -} - -chroot_facet_mountable::ptr -chroot_facet_mountable::create () -{ - return ptr(new chroot_facet_mountable()); -} - -chroot::facet::facet::ptr -chroot_facet_mountable::clone () const -{ - return ptr(new chroot_facet_mountable(*this)); -} - -std::string const& -chroot_facet_mountable::get_name () const -{ - static const std::string name("mountable"); - - return name; -} - -std::string const& -chroot_facet_mountable::get_mount_device () const -{ - return this->mount_device; -} - -void -chroot_facet_mountable::set_mount_device (std::string const& mount_device) -{ - this->mount_device = mount_device; -} - -std::string const& -chroot_facet_mountable::get_mount_options () const -{ - return this->mount_options; -} - -void -chroot_facet_mountable::set_mount_options (std::string const& mount_options) -{ - this->mount_options = mount_options; -} - -std::string const& -chroot_facet_mountable::get_location () const -{ - return this->location; -} - -void -chroot_facet_mountable::set_location (std::string const& location) -{ - if (!location.empty() && !is_absname(location)) - throw chroot::chroot::error(location, chroot::chroot::LOCATION_ABS); - - this->location = location; -} - -void -chroot_facet_mountable::setup_env (chroot::chroot const& chroot, - environment& env) const -{ - env.add("CHROOT_MOUNT_DEVICE", get_mount_device()); - env.add("CHROOT_MOUNT_OPTIONS", get_mount_options()); - env.add("CHROOT_LOCATION", get_location()); -} - -chroot::chroot::session_flags -chroot_facet_mountable::get_session_flags (chroot::chroot const& chroot) const -{ - return chroot::chroot::SESSION_NOFLAGS; -} - -void -chroot_facet_mountable::get_details (chroot::chroot const& chroot, - format_detail& detail) const -{ - if (!get_mount_device().empty()) - detail.add(_("Mount Device"), get_mount_device()); - if (!get_mount_options().empty()) - detail.add(_("Mount Options"), get_mount_options()); - if (!get_location().empty()) - detail.add(_("Location"), get_location()); -} - -void -chroot_facet_mountable::get_used_keys (string_list& used_keys) const -{ - used_keys.push_back("mount-device"); - used_keys.push_back("mount-options"); - used_keys.push_back("location"); -} - -void -chroot_facet_mountable::get_keyfile (chroot::chroot const& chroot, - keyfile& keyfile) const -{ - bool session = static_cast<bool>(chroot.get_facet<chroot_facet_session>()); - - if (session) - keyfile::set_object_value(*this, &chroot_facet_mountable::get_mount_device, - keyfile, chroot.get_name(), - "mount-device"); - - keyfile::set_object_value(*this, &chroot_facet_mountable::get_mount_options, - keyfile, chroot.get_name(), - "mount-options"); - - keyfile::set_object_value(*this, &chroot_facet_mountable::get_location, - keyfile, chroot.get_name(), - "location"); -} - -void -chroot_facet_mountable::set_keyfile (chroot::chroot& chroot, - keyfile const& keyfile) -{ - bool session = static_cast<bool>(chroot.get_facet<chroot_facet_session>()); - - keyfile::get_object_value(*this, &chroot_facet_mountable::set_mount_device, - keyfile, chroot.get_name(), - "mount-device", - session ? - keyfile::PRIORITY_REQUIRED : - keyfile::PRIORITY_DISALLOWED); - - keyfile::get_object_value(*this, &chroot_facet_mountable::set_mount_options, - keyfile, chroot.get_name(), - "mount-options", - keyfile::PRIORITY_OPTIONAL); - - keyfile::get_object_value(*this, &chroot_facet_mountable::set_location, - keyfile, chroot.get_name(), - "location", - keyfile::PRIORITY_OPTIONAL); -} diff --git a/lib/sbuild/chroot-facet-mountable.h b/lib/sbuild/chroot-facet-mountable.h deleted file mode 100644 index 05468537..00000000 --- a/lib/sbuild/chroot-facet-mountable.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org> - * - * schroot is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * schroot is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - * - *********************************************************************/ - -#ifndef SBUILD_CHROOT_FACET_MOUNTABLE_H -#define SBUILD_CHROOT_FACET_MOUNTABLE_H - -#include <sbuild/chroot/facet/facet.h> - -namespace sbuild -{ - - /** - * Chroot support for mountable devices and filesystems. - * - * This facet should be selected for sessions using the mount - * command to create the chroot. The specified device will be - * mounted on demand. - * - * This facet is not restricted to block devices and can also be - * used for network filesystems, loopback files and other - * mountable objects. - */ - class chroot_facet_mountable : public chroot::facet::facet - { - public: - /// A shared_ptr to a chroot facet object. - typedef std::shared_ptr<chroot_facet_mountable> ptr; - - /// A shared_ptr to a const chroot facet object. - typedef std::shared_ptr<const chroot_facet_mountable> const_ptr; - - private: - /// The constructor. - chroot_facet_mountable (); - - public: - /// The destructor. - virtual ~chroot_facet_mountable (); - - /** - * Create a chroot facet. - * - * @returns a shared_ptr to the new chroot facet. - */ - static ptr - create (); - - virtual facet::ptr - clone () const; - - virtual std::string const& - get_name () const; - - /** - * Get the device path of the chroot block device to mount. - * - * @returns the mount device. - */ - virtual std::string const& - get_mount_device () const; - - /** - * Set the device path of the chroot block device to mount. - * - * @param mount_device the mount device. - */ - virtual void - set_mount_device (std::string const& mount_device); - - /** - * Get the filesystem mount options of the chroot block device. - * - * @returns the mount options. - */ - virtual std::string const& - get_mount_options () const; - - /** - * Set the filesystem mount options of the chroot block device. - * - * @param mount_options the mount options. - */ - virtual void - set_mount_options (std::string const& mount_options); - - /** - * Get the location. This is a path to the chroot directory - * inside the device (absolute path from the device root). - * - * @returns the location. - */ - virtual std::string const& - get_location () const; - - /** - * Set the location. This is a path to the chroot directory - * inside the device (absolute path from the device root). - * - * @param location the location. - */ - virtual void - set_location (std::string const& location); - - virtual void - setup_env (chroot::chroot const& chroot, - environment& env) const; - - virtual chroot::chroot::session_flags - get_session_flags (chroot::chroot const& chroot) const; - - virtual void - get_details (chroot::chroot const& chroot, - format_detail& detail) const; - - virtual void - get_used_keys (string_list& used_keys) const; - - virtual void - get_keyfile (chroot::chroot const& chroot, - keyfile& keyfile) const; - - virtual void - set_keyfile (chroot::chroot& chroot, - keyfile const& keyfile); - - private: - /// The device to mount. - std::string mount_device; - /// The options to mount the device with. - std::string mount_options; - /// Location inside the mount location root. - std::string location; - }; - -} - -#endif /* SBUILD_CHROOT_FACET_MOUNTABLE_H */ - -/* - * Local Variables: - * mode:C++ - * End: - */ diff --git a/lib/sbuild/chroot-facet-session-clonable.cc b/lib/sbuild/chroot-facet-session-clonable.cc index 57a6074c..ebc71d12 100644 --- a/lib/sbuild/chroot-facet-session-clonable.cc +++ b/lib/sbuild/chroot-facet-session-clonable.cc @@ -19,7 +19,7 @@ #include <config.h> #include <sbuild/chroot/chroot.h> -#include "chroot-facet-mountable.h" +#include <sbuild/chroot/facet/mountable.h> #include "chroot-facet-session.h" #include "chroot-facet-session-clonable.h" #include "chroot-facet-source-clonable.h" @@ -153,8 +153,8 @@ chroot_facet_session_clonable::clone_session_setup (chroot::chroot const& parent std::shared_ptr<chroot::block_device_base> blockdevbase(std::dynamic_pointer_cast<chroot::block_device_base>(clone)); if (blockdevbase) { - chroot_facet_mountable::ptr pmnt - (clone->get_facet<chroot_facet_mountable>()); + chroot::facet::mountable::ptr pmnt + (clone->get_facet<chroot::facet::mountable>()); if (pmnt) pmnt->set_mount_device(blockdevbase->get_device()); } @@ -165,8 +165,8 @@ chroot_facet_session_clonable::clone_session_setup (chroot::chroot const& parent std::shared_ptr<chroot::loopback> loopback(std::dynamic_pointer_cast<chroot::loopback>(clone)); if (loopback) { - chroot_facet_mountable::ptr pmnt - (clone->get_facet<chroot_facet_mountable>()); + chroot::facet::mountable::ptr pmnt + (clone->get_facet<chroot::facet::mountable>()); if (pmnt) pmnt->set_mount_device(loopback->get_filename()); } diff --git a/lib/sbuild/chroot/block-device-base.cc b/lib/sbuild/chroot/block-device-base.cc index 4f8cbf9c..1f43fda2 100644 --- a/lib/sbuild/chroot/block-device-base.cc +++ b/lib/sbuild/chroot/block-device-base.cc @@ -20,7 +20,7 @@ #include <sbuild/chroot/block-device-base.h> #include <sbuild/chroot/lvm-snapshot.h> -#include "chroot-facet-mountable.h" +#include <sbuild/chroot/facet/mountable.h> #include "format-detail.h" #include "lock.h" #include "util.h" @@ -42,7 +42,7 @@ namespace sbuild chroot(), device() { - add_facet(chroot_facet_mountable::create()); + add_facet(facet::mountable::create()); } block_device_base::block_device_base @@ -74,8 +74,8 @@ namespace sbuild std::string block_device_base::get_path () const { - chroot_facet_mountable::const_ptr pmnt - (get_facet<chroot_facet_mountable>()); + facet::mountable::const_ptr pmnt + (get_facet<facet::mountable>()); std::string path(get_mount_location()); diff --git a/lib/sbuild/chroot/facet/mountable.cc b/lib/sbuild/chroot/facet/mountable.cc new file mode 100644 index 00000000..ce43129c --- /dev/null +++ b/lib/sbuild/chroot/facet/mountable.cc @@ -0,0 +1,192 @@ +/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org> + * + * schroot is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * + *********************************************************************/ + +#include <config.h> + +#include <sbuild/chroot/chroot.h> +#include <sbuild/chroot/facet/mountable.h> +#include "chroot-facet-session.h" + +#include <cassert> + +#include <boost/format.hpp> + +using boost::format; +using std::endl; +using namespace sbuild; + +namespace sbuild +{ + namespace chroot + { + namespace facet + { + + mountable::mountable (): + facet(), + mount_device(), + mount_options(), + location() + { + } + + mountable::~mountable () + { + } + + mountable::ptr + mountable::create () + { + return ptr(new mountable()); + } + + facet::ptr + mountable::clone () const + { + return ptr(new mountable(*this)); + } + + std::string const& + mountable::get_name () const + { + static const std::string name("mountable"); + + return name; + } + + std::string const& + mountable::get_mount_device () const + { + return this->mount_device; + } + + void + mountable::set_mount_device (std::string const& mount_device) + { + this->mount_device = mount_device; + } + + std::string const& + mountable::get_mount_options () const + { + return this->mount_options; + } + + void + mountable::set_mount_options (std::string const& mount_options) + { + this->mount_options = mount_options; + } + + std::string const& + mountable::get_location () const + { + return this->location; + } + + void + mountable::set_location (std::string const& location) + { + if (!location.empty() && !is_absname(location)) + throw chroot::error(location, chroot::LOCATION_ABS); + + this->location = location; + } + + void + mountable::setup_env (chroot const& chroot, + environment& env) const + { + env.add("CHROOT_MOUNT_DEVICE", get_mount_device()); + env.add("CHROOT_MOUNT_OPTIONS", get_mount_options()); + env.add("CHROOT_LOCATION", get_location()); + } + + chroot::session_flags + mountable::get_session_flags (chroot const& chroot) const + { + return chroot::SESSION_NOFLAGS; + } + + void + mountable::get_details (chroot const& chroot, + format_detail& detail) const + { + if (!get_mount_device().empty()) + detail.add(_("Mount Device"), get_mount_device()); + if (!get_mount_options().empty()) + detail.add(_("Mount Options"), get_mount_options()); + if (!get_location().empty()) + detail.add(_("Location"), get_location()); + } + + void + mountable::get_used_keys (string_list& used_keys) const + { + used_keys.push_back("mount-device"); + used_keys.push_back("mount-options"); + used_keys.push_back("location"); + } + + void + mountable::get_keyfile (chroot const& chroot, + keyfile& keyfile) const + { + bool session = static_cast<bool>(chroot.get_facet<chroot_facet_session>()); + + if (session) + keyfile::set_object_value(*this, &mountable::get_mount_device, + keyfile, chroot.get_name(), + "mount-device"); + + keyfile::set_object_value(*this, &mountable::get_mount_options, + keyfile, chroot.get_name(), + "mount-options"); + + keyfile::set_object_value(*this, &mountable::get_location, + keyfile, chroot.get_name(), + "location"); + } + + void + mountable::set_keyfile (chroot& chroot, + keyfile const& keyfile) + { + bool session = static_cast<bool>(chroot.get_facet<chroot_facet_session>()); + + keyfile::get_object_value(*this, &mountable::set_mount_device, + keyfile, chroot.get_name(), + "mount-device", + session ? + keyfile::PRIORITY_REQUIRED : + keyfile::PRIORITY_DISALLOWED); + + keyfile::get_object_value(*this, &mountable::set_mount_options, + keyfile, chroot.get_name(), + "mount-options", + keyfile::PRIORITY_OPTIONAL); + + keyfile::get_object_value(*this, &mountable::set_location, + keyfile, chroot.get_name(), + "location", + keyfile::PRIORITY_OPTIONAL); + } + + } + } +} diff --git a/lib/sbuild/chroot/facet/mountable.h b/lib/sbuild/chroot/facet/mountable.h new file mode 100644 index 00000000..d7ef4b81 --- /dev/null +++ b/lib/sbuild/chroot/facet/mountable.h @@ -0,0 +1,164 @@ +/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org> + * + * schroot is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * schroot is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + * + *********************************************************************/ + +#ifndef SBUILD_CHROOT_FACET_MOUNTABLE_H +#define SBUILD_CHROOT_FACET_MOUNTABLE_H + +#include <sbuild/chroot/facet/facet.h> + +namespace sbuild +{ + namespace chroot + { + namespace facet + { + + /** + * Chroot support for mountable devices and filesystems. + * + * This facet should be selected for sessions using the mount + * command to create the chroot. The specified device will be + * mounted on demand. + * + * This facet is not restricted to block devices and can also be + * used for network filesystems, loopback files and other + * mountable objects. + */ + class mountable : public facet + { + public: + /// A shared_ptr to a chroot facet object. + typedef std::shared_ptr<mountable> ptr; + + /// A shared_ptr to a const chroot facet object. + typedef std::shared_ptr<const mountable> const_ptr; + + private: + /// The constructor. + mountable (); + + public: + /// The destructor. + virtual ~mountable (); + + /** + * Create a chroot facet. + * + * @returns a shared_ptr to the new chroot facet. + */ + static ptr + create (); + + virtual facet::ptr + clone () const; + + virtual std::string const& + get_name () const; + + /** + * Get the device path of the chroot block device to mount. + * + * @returns the mount device. + */ + virtual std::string const& + get_mount_device () const; + + /** + * Set the device path of the chroot block device to mount. + * + * @param mount_device the mount device. + */ + virtual void + set_mount_device (std::string const& mount_device); + + /** + * Get the filesystem mount options of the chroot block device. + * + * @returns the mount options. + */ + virtual std::string const& + get_mount_options () const; + + /** + * Set the filesystem mount options of the chroot block device. + * + * @param mount_options the mount options. + */ + virtual void + set_mount_options (std::string const& mount_options); + + /** + * Get the location. This is a path to the chroot directory + * inside the device (absolute path from the device root). + * + * @returns the location. + */ + virtual std::string const& + get_location () const; + + /** + * Set the location. This is a path to the chroot directory + * inside the device (absolute path from the device root). + * + * @param location the location. + */ + virtual void + set_location (std::string const& location); + + virtual void + setup_env (chroot const& chroot, + environment& env) const; + + virtual chroot::session_flags + get_session_flags (chroot const& chroot) const; + + virtual void + get_details (chroot const& chroot, + format_detail& detail) const; + + virtual void + get_used_keys (string_list& used_keys) const; + + virtual void + get_keyfile (chroot const& chroot, + keyfile& keyfile) const; + + virtual void + set_keyfile (chroot& chroot, + keyfile const& keyfile); + + private: + /// The device to mount. + std::string mount_device; + /// The options to mount the device with. + std::string mount_options; + /// Location inside the mount location root. + std::string location; + }; + + } + } +} + +#endif /* SBUILD_CHROOT_FACET_MOUNTABLE_H */ + +/* + * Local Variables: + * mode:C++ + * End: + */ diff --git a/lib/sbuild/chroot/loopback.cc b/lib/sbuild/chroot/loopback.cc index b7d2ab3c..03290977 100644 --- a/lib/sbuild/chroot/loopback.cc +++ b/lib/sbuild/chroot/loopback.cc @@ -21,7 +21,7 @@ #include <sbuild/chroot/loopback.h> #include "chroot-facet-session-clonable.h" #include "chroot-facet-source-clonable.h" -#include "chroot-facet-mountable.h" +#include <sbuild/chroot/facet/mountable.h> #ifdef SBUILD_FEATURE_UNION #include "chroot-facet-union.h" #endif // SBUILD_FEATURE_UNION @@ -47,7 +47,7 @@ namespace sbuild chroot(), filename() { - add_facet(chroot_facet_mountable::create()); + add_facet(facet::mountable::create()); #ifdef SBUILD_FEATURE_UNION add_facet(chroot_facet_union::create()); #endif // SBUILD_FEATURE_UNION @@ -117,8 +117,8 @@ namespace sbuild std::string loopback::get_path () const { - chroot_facet_mountable::const_ptr pmnt - (get_facet<chroot_facet_mountable>()); + facet::mountable::const_ptr pmnt + (get_facet<facet::mountable>()); std::string path(get_mount_location()); diff --git a/lib/sbuild/chroot/lvm-snapshot.cc b/lib/sbuild/chroot/lvm-snapshot.cc index 0b6c55eb..d0d9f2b3 100644 --- a/lib/sbuild/chroot/lvm-snapshot.cc +++ b/lib/sbuild/chroot/lvm-snapshot.cc @@ -23,7 +23,7 @@ #include "chroot-facet-session.h" #include "chroot-facet-session-clonable.h" #include "chroot-facet-source-clonable.h" -#include "chroot-facet-mountable.h" +#include <sbuild/chroot/facet/mountable.h> #include "format-detail.h" #include <cassert> @@ -109,8 +109,8 @@ namespace sbuild this->snapshot_device = snapshot_device; - chroot_facet_mountable::ptr pmnt - (get_facet<chroot_facet_mountable>()); + facet::mountable::ptr pmnt + (get_facet<facet::mountable>()); if (pmnt) pmnt->set_mount_device(this->snapshot_device); } |