25 #ifndef COMMON_UTILS_IMG_HPP
26 #define COMMON_UTILS_IMG_HPP
38 bool mountImage(
const std::string& image,
const std::string& loopdev,
const std::string& path);
44 bool umountImage(
const std::string& path,
const std::string& loopdev);
53 #endif // COMMON_UTILS_IMG_HPP
bool umountImage(const std::string &path, const std::string &loopdev)
Umounts previously mounted image.
Definition: img.cpp:150
bool mountImage(const std::string &image, const std::string &path, const std::string &loopdev)
Mount an ext4 image from file on a given path by using a loop device.
Definition: img.cpp:142
bool getFreeLoopDevice(std::string &ret)
Returns string with first free loop device.
Definition: img.cpp:118
bool copyImageContents(const std::string &img, const std::string &dst)
Mounts an image and copies its contents to dst directory.
Definition: img.cpp:174