Lines Matching defs:path
49 MountStatus GetMountStatusForPath(const std::string &path)
51 FstabItem *item = FindFstabItemForPath(*g_fstab, path.c_str());
94 int UmountForPath(const std::string& path)
101 FstabItem *item = FindFstabItemForPath(*g_fstab, path.c_str());
103 LOG(ERROR) << "Cannot find fstab item for " << path << " to umount.";
107 LOG(DEBUG) << "Umount for path " << path;
114 if (path == "/data") {
166 int MountSdcard(std::string &path, std::string &mountPoint)
168 if (path.empty() || mountPoint.empty()) {
169 LOG(ERROR) << "path or mountPoint is null, mount fail";
176 LOG(INFO) << path << " already mounted";
181 if (mount(path.c_str(), mountPoint.c_str(), type, 0, nullptr) == 0) {
186 if (MountNtfsWithRetry(path, mountPoint) == 0) {
193 int MountForPath(const std::string &path)
200 FstabItem *item = FindFstabItemForPath(*g_fstab, path.c_str());
203 LOG(ERROR) << "Cannot find fstab item for " << path << " to mount.";
207 LOG(DEBUG) << "Mount for path " << path;
213 LOG(INFO) << path << " already mounted";
254 int FormatPartition(const std::string &path, bool isZeroErase)
261 FstabItem *item = FindFstabItemForPath(*g_fstab, path.c_str());
263 LOG(ERROR) << "Cannot find fstab item for " << path << " to format.";
278 if (UmountForPath(path) != 0) {
288 LOG(ERROR) << "Format " << path << " failed";