The specified lower directories will be stacked beginning from the
rightmost one and going left.
Change-Id: Ifaec0366ed5f8e17e596bcbc61c82de345e358a6
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
int MountDirectories(const std::vector<std::string>& srcs,
const std::string& dest) {
- std::string opt = "lowerdir=" + dest;
+ std::string opt = "lowerdir=";
for (auto& src : srcs)
- opt += ":" + src;
+ opt += src + ":";
+ opt += dest;
_D("mount opt: %s", opt.c_str());
int ret = mount(nullptr, dest.c_str(), "overlay", MS_RDONLY, opt.c_str());