Lines Matching refs:root

306 static IncFsControl* makeControl(const char* root) {  in makeControl()  argument
307 auto cmd = openRaw(root, INCFS_PENDING_READS_FILENAME); in makeControl()
315 auto logs = openRaw(root, INCFS_LOG_FILENAME); in makeControl()
326 static std::string makeCommandPath(std::string_view root, std::string_view item) { in makeCommandPath() argument
328 if (itemRoot != root) { in makeCommandPath()
474 auto root = registry().rootFor(dir); in IncFs_Open() local
475 if (root.empty()) { in IncFs_Open()
479 return makeControl(android::incfs::details::c_str(root)); in IncFs_Open()
534 auto root = rootForCmd(control->cmd); in IncFs_SetOptions() local
535 if (root.empty()) { in IncFs_SetOptions()
539 if (::mount(nullptr, root.c_str(), nullptr, MS_REMOUNT | MS_NOSUID | MS_NODEV | MS_NOATIME, in IncFs_SetOptions()
542 PLOG(ERROR) << "[incfs] Failed to remount IncFS filesystem: " << root; in IncFs_SetOptions()
659 auto [root, subpath] = registry().rootAndSubpathFor(path); in IncFs_MakeFile()
660 if (root.empty()) { in IncFs_MakeFile()
689 PLOG(WARNING) << "[incfs] makeFile failed for " << root << " / " << subdir << " / " << name in IncFs_MakeFile()
693 if (::chmod(android::incfs::path::join(root, subpath).c_str(), mode)) { in IncFs_MakeFile()
712 std::string_view root, int32_t mode) { in makeDirs() argument
724 if (!android::incfs::path::startsWith(parent, root)) { in makeDirs()
729 if (auto parentMkdirRes = makeDirs(parent, android::incfs::path::dirName(path), root, mode)) { in makeDirs()
739 const auto root = rootForCmd(control->cmd); in IncFs_MakeDir() local
740 if (root.empty()) { in IncFs_MakeDir()
744 auto commandPath = makeCommandPath(root, path); in IncFs_MakeDir()
760 const auto root = rootForCmd(control->cmd); in IncFs_MakeDirs() local
761 if (root.empty()) { in IncFs_MakeDirs()
765 auto commandPath = makeCommandPath(root, path); in IncFs_MakeDirs()
770 return makeDirs(commandPath, path, root, mode); in IncFs_MakeDirs()
795 const auto root = rootForCmd(control->cmd); in IncFs_GetMetadataById() local
796 if (root.empty()) { in IncFs_GetMetadataById()
799 auto name = android::incfs::path::join(root, android::incfs::kIndexDir, toStringImpl(fileId)); in IncFs_GetMetadataById()
809 const auto root = rootForCmd(control->cmd); in IncFs_GetMetadataByPath() local
810 if (root.empty() || root != pathRoot) { in IncFs_GetMetadataByPath()
822 const auto root = rootForCmd(control->cmd); in IncFs_GetId() local
823 if (root.empty() || root != pathRoot) { in IncFs_GetId()
858 const auto root = rootForCmd(control->cmd); in IncFs_GetSignatureById() local
859 if (root.empty()) { in IncFs_GetSignatureById()
862 auto file = android::incfs::path::join(root, android::incfs::kIndexDir, toStringImpl(fileId)); in IncFs_GetSignatureById()
877 const auto root = rootForCmd(control->cmd); in IncFs_GetSignatureByPath() local
878 if (root.empty() || root != pathRoot) { in IncFs_GetSignatureByPath()
901 auto root = rootForCmd(control->cmd); in IncFs_Link() local
902 if (root.empty()) { in IncFs_Link()
905 auto cmdFrom = makeCommandPath(root, fromPath); in IncFs_Link()
909 auto cmdWhere = makeCommandPath(root, wherePath); in IncFs_Link()
924 auto root = rootForCmd(control->cmd); in IncFs_Unlink() local
925 if (root.empty()) { in IncFs_Unlink()
928 auto cmdPath = makeCommandPath(root, path); in IncFs_Unlink()
1061 const auto root = rootForCmd(cmd); in IncFs_OpenForSpecialOpsByPath() local
1062 if (root.empty() || root != pathRoot) { in IncFs_OpenForSpecialOpsByPath()
1065 return openForSpecialOps(cmd, makeCommandPath(root, path).c_str()); in IncFs_OpenForSpecialOpsByPath()
1074 const auto root = rootForCmd(cmd); in IncFs_OpenForSpecialOpsById() local
1075 if (root.empty()) { in IncFs_OpenForSpecialOpsById()
1078 auto name = android::incfs::path::join(root, android::incfs::kIndexDir, toStringImpl(id)); in IncFs_OpenForSpecialOpsById()
1079 return openForSpecialOps(cmd, makeCommandPath(root, name).c_str()); in IncFs_OpenForSpecialOpsById()