| 232 | } |
| 233 | |
| 234 | static void doumount(const std::string& mntPnt) { |
| 235 | errno = 0; |
| 236 | int res; |
| 237 | const char *mntpnt = mntPnt.c_str(); |
| 238 | if ((res = umount2(mntpnt, MNT_DETACH)) == 0) |
| 239 | LOGD("umount2(\"%s\", MNT_DETACH): returned (0): 0 (Success)", mntpnt); |
| 240 | else |
| 241 | LOGE("umount2(\"%s\", MNT_DETACH): returned %d: %d (%s)", mntpnt, res, errno, strerror(errno)); |
| 242 | } |
| 243 | |
| 244 | static void remount(const std::vector<MountInfo>& mounts) { |
| 245 | for (const auto& mount : mounts) { |