Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 709) sorted by relevance

12345678910>>...29

/system/incremental_delivery/incfs/
Dpath.cpp32 namespace android::incfs::path { namespace
66 bool isAbsolute(std::string_view path) { in isAbsolute() argument
67 return !path.empty() && path[0] == '/'; in isAbsolute()
70 std::string normalize(std::string_view path) { in normalize() argument
71 if (path.empty()) { in normalize()
74 if (path.starts_with("../"sv)) { in normalize()
79 if (isAbsolute(path)) { in normalize()
80 path.remove_prefix(1); in normalize()
91 for (; end != path.npos; start = end + 1) { in normalize()
92 end = path.find('/', start); in normalize()
[all …]
DMountRegistry.cpp40 static void fixProcPath(std::string& path) { in fixProcPath() argument
43 auto pos = std::search(path.begin(), path.end(), kPrefix.begin(), kPrefix.end()); in fixProcPath()
44 if (pos == path.end()) { in fixProcPath()
49 if (path.end() - pos < kPatternLength || !std::equal(kPrefix.begin(), kPrefix.end(), pos)) { in fixProcPath()
63 } while (pos != path.end()); in fixProcPath()
64 path.erase(dest, path.end()); in fixProcPath()
88 std::string_view path) const { in rootIndex()
89 auto it = rootByBindPoint.lower_bound(path); in rootIndex()
90 if (it != rootByBindPoint.end() && it->first == path) { in rootIndex()
95 if (path::startsWith(path, it->first) && path.size() > it->first.size()) { in rootIndex()
[all …]
/system/apex/apexd/
Dapexd_utils_test.cpp45 auto result = FindFirstExistingDirectory(first_dir.path, second_dir.path); in TEST()
47 ASSERT_EQ(*result, first_dir.path); in TEST()
53 auto result = FindFirstExistingDirectory(first_dir.path, second_dir); in TEST()
55 ASSERT_EQ(*result, first_dir.path); in TEST()
61 auto result = FindFirstExistingDirectory(first_dir, second_dir.path); in TEST()
63 ASSERT_EQ(*result, second_dir.path); in TEST()
76 auto result = FindFirstExistingDirectory(first_file.path, second_dir.path); in TEST()
78 ASSERT_EQ(*result, second_dir.path); in TEST()
84 auto result = FindFirstExistingDirectory(first_dir.path, second_file.path); in TEST()
86 ASSERT_EQ(*result, first_dir.path); in TEST()
[all …]
Dapexd_utils.h96 Result<void> WalkDir(const std::string& path, Fn fn) { in WalkDir() argument
99 auto it = fs::directory_iterator(path, ec); in WalkDir()
106 return Error() << "Can't open " << path in WalkDir()
113 Result<std::vector<std::string>> ReadDir(const std::string& path, FilterFn fn) { in ReadDir() argument
117 auto status = WalkDir(path, [&](const fs::directory_entry& entry) { in ReadDir()
119 ret.push_back(entry.path()); in ReadDir()
128 inline bool IsEmptyDirectory(const std::string& path) { in IsEmptyDirectory() argument
129 auto res = ReadDir(path, [](auto _) { return true; }); in IsEmptyDirectory()
133 inline Result<void> createDirIfNeeded(const std::string& path, mode_t mode) { in createDirIfNeeded() argument
136 if (stat(path.c_str(), &stat_data) != 0) { in createDirIfNeeded()
[all …]
/system/bt/gd/cert/
Dbluetooth_packets_python3_setup.py32 PYBIND11_INCLUDE_DIR = os.path.join(ANDROID_BUILD_TOP,
34 GD_DIR = os.path.join(ANDROID_BUILD_TOP, "system/bt/gd")
35 BT_PACKETS_GEN_DIR = os.path.join(
38 BT_PACKETS_PY3_GEN_DIR = os.path.join(
44 os.path.join(GD_DIR, "l2cap/fcs.cc"),
45 os.path.join(GD_DIR, "packet/bit_inserter.cc"),
46 os.path.join(GD_DIR, "packet/byte_inserter.cc"),
47 os.path.join(GD_DIR, "packet/byte_observer.cc"),
48 os.path.join(GD_DIR, "packet/iterator.cc"),
49 os.path.join(GD_DIR, "packet/fragmenting_inserter.cc"),
[all …]
/system/linkerconfig/modules/
Dnamespace.cc29 const std::string& path) { in FindFromPathList() argument
32 if (path_item == path) return true; in FindFromPathList()
46 ns.AddSearchPath(apex_info.path + "/${LIB}"); in InitializeWithApex()
47 ns.AddPermittedPath(apex_info.path + "/${LIB}"); in InitializeWithApex()
91 void Namespace::AddSearchPath(const std::string& path, AsanPath path_from_asan) { in AddSearchPath() argument
92 search_paths_.push_back(path); in AddSearchPath()
98 asan_search_paths_.push_back(path); in AddSearchPath()
101 asan_search_paths_.push_back(kDataAsanPath + path); in AddSearchPath()
102 asan_search_paths_.push_back(path); in AddSearchPath()
107 void Namespace::AddPermittedPath(const std::string& path, in AddPermittedPath() argument
[all …]
/system/sepolicy/tools/
Dsepolicy_cleanup_check.sh39 …if [[ `find $sedir -name "*_contexts" -not -path "*prebuilts*" -exec grep $type '{}' \; |wc -l` -e…
52 path=`echo $path_line | sed 's/^.*:[^\/]*\([^ ]*\) .*$/\1/'`
54 path=`echo $path | sed 's/\[[^]]*\]/*/' | sed 's/+/*/'`
56 if [ -n "`$adb_cmd shell ls -lZ $path < /dev/null |& grep "No such file or directory"`" ]; then
57 echo "$path does not exist"
66path=`echo $file_line | sed 's/rootfs //' | sed 's/sysfs /\/sys/' | sed 's/proc /\/proc/' | sed 's…
68 if [[ $path = *" "* ]]; then
72 if [ -n "`$adb_cmd shell ls -lZ $path < /dev/null |& grep "No such file or directory"`" ]; then
73 echo "$path does not exist"
80 …name file_contexts -not -path "*prebuilts*" -exec grep "^/" '{}' \; | cut -d' ' -f1 | cut -f1 | so…
[all …]
/system/core/base/
Dfile.cpp56 std::wstring path; in mkstemp() local
57 CHECK(android::base::UTF8ToWide(name_template, &path)) in mkstemp()
59 if (_wmktemp_s(path.data(), path.size() + 1) != 0) { in mkstemp()
65 int fd = _wopen(path.c_str(), O_CREAT | O_EXCL | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR); in mkstemp()
71 CHECK(android::base::WideToUTF8(path, &path_utf8)) << "path can't be converted to utf8"; in mkstemp()
79 std::wstring path; in mkdtemp() local
80 CHECK(android::base::UTF8ToWide(name_template, &path)) in mkdtemp()
83 if (_wmktemp_s(path.data(), path.size() + 1) != 0) { in mkdtemp()
87 if (_wmkdir(path.c_str()) != 0) { in mkdtemp()
92 CHECK(android::base::WideToUTF8(path, &path_utf8)) << "path can't be converted to utf8"; in mkdtemp()
[all …]
Dfile_test.cpp48 ASSERT_NE(tf.fd, -1) << tf.path; in TEST()
49 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST()
52 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
61 ASSERT_EQ(0, unlink(link.path)); in TEST()
62 ASSERT_EQ(0, symlink(target.path, link.path)); in TEST()
63 ASSERT_FALSE(android::base::WriteStringToFile("foo", link.path, false)); in TEST()
65 ASSERT_TRUE(android::base::WriteStringToFile("foo", link.path, true)); in TEST()
68 ASSERT_FALSE(android::base::ReadFileToString(link.path, &s)); in TEST()
70 ASSERT_TRUE(android::base::ReadFileToString(link.path, &s, true)); in TEST()
80 ASSERT_NE(tf.fd, -1) << tf.path; in TEST()
[all …]
/system/core/libcutils/
Dfs.cpp42 static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t gid, in fs_prepare_path_impl() argument
52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_path_impl()
56 ALOGE("Failed to lstat(%s): %s", path, strerror(errno)); in fs_prepare_path_impl()
64 ALOGE("Not a %s: %s", (prepare_as_dir ? "directory" : "regular file"), path); in fs_prepare_path_impl()
77 path, uid, gid, sb.st_uid, sb.st_gid); in fs_prepare_path_impl()
81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl()
88 ? TEMP_FAILURE_RETRY(mkdir(path, mode)) in fs_prepare_path_impl()
89 : TEMP_FAILURE_RETRY(open(path, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0644)); in fs_prepare_path_impl()
93 (prepare_as_dir ? "mkdir" : "open"), path, strerror(errno)); in fs_prepare_path_impl()
99 ALOGW("Failed to close file after create %s: %s", path, strerror(errno)); in fs_prepare_path_impl()
[all …]
Dcanned_fs_config.cpp29 const char* path; member
41 return strcmp(((Path*)a)->path, ((Path*)b)->path); in path_compare()
67 p->path = strdup(rootdir ? "" : strtok(line, " ")); in load_canned_fs_config()
94 void canned_fs_config(const char* path, int dir, const char* target_out_path, in canned_fs_config() argument
98 key.path = path; in canned_fs_config()
99 if (path[0] == '/') key.path++; // canned paths lack the leading '/' in canned_fs_config()
102 fprintf(stderr, "failed to find [%s] in canned fs_config\n", path); in canned_fs_config()
116 fs_config(path, dir, target_out_path, &c_uid, &c_gid, &c_mode, &c_capabilities); in canned_fs_config()
118 if (c_uid != *uid) printf("%s uid %d %d\n", path, *uid, c_uid); in canned_fs_config()
119 if (c_gid != *gid) printf("%s gid %d %d\n", path, *gid, c_gid); in canned_fs_config()
[all …]
/system/core/init/
Dutil_test.cpp44 EXPECT_RESULT_OK(WriteFile(tf.path, s)); in TEST()
45 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0620, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
46 auto file_contents = ReadFile(tf.path); in TEST()
55 EXPECT_RESULT_OK(WriteFile(tf.path, s)); in TEST()
56 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0602, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
57 auto file_contents = ReadFile(tf.path); in TEST()
91 EXPECT_RESULT_OK(WriteFile(tf.path, contents)); in TEST()
93 auto read_back_contents = ReadFile(tf.path); in TEST()
102 std::string path = android::base::StringPrintf("%s/does-not-exist", test_dir.path); in TEST() local
103 EXPECT_RESULT_OK(WriteFile(path, s)); in TEST()
[all …]
Ddevices.cpp58 static bool FindPciDevicePrefix(const std::string& path, std::string* result) { in FindPciDevicePrefix() argument
61 if (!StartsWith(path, "/devices/pci")) return false; in FindPciDevicePrefix()
68 auto end = path.find('/', start); in FindPciDevicePrefix()
71 end = path.find('/', end + 1); in FindPciDevicePrefix()
81 *result = path.substr(start, length); in FindPciDevicePrefix()
89 static bool FindVbdDevicePrefix(const std::string& path, std::string* result) { in FindVbdDevicePrefix() argument
92 if (!StartsWith(path, "/devices/vbd-")) return false; in FindVbdDevicePrefix()
99 auto end = path.find('/', start); in FindVbdDevicePrefix()
105 *result = path.substr(start, length); in FindVbdDevicePrefix()
113 static bool FindDmDevice(const std::string& path, std::string* name, std::string* uuid) { in FindDmDevice() argument
[all …]
/system/core/healthd/
DBatteryMonitor.cpp177 int BatteryMonitor::readFromFile(const String8& path, std::string* buf) { in readFromFile() argument
178 if (android::base::ReadFileToString(path.c_str(), buf)) { in readFromFile()
184 BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String8& path) { in readPowerSupplyType() argument
203 if (readFromFile(path, &buf) <= 0) in readPowerSupplyType()
215 bool BatteryMonitor::getBooleanField(const String8& path) { in getBooleanField() argument
219 if (readFromFile(path, &buf) > 0) in getBooleanField()
226 int BatteryMonitor::getIntField(const String8& path) { in getIntField() argument
230 if (readFromFile(path, &buf) > 0) in getIntField()
239 String8 path; in isScopedPowerSupply() local
240 path.appendFormat("%s/%s/scope", POWER_SUPPLY_SYSFS_PATH, name); in isScopedPowerSupply()
[all …]
/system/tools/hidl/hashing/
DHash.cpp33 Hash& Hash::getMutableHash(const std::string& path) { in getMutableHash() argument
36 auto it = hashes.find(path); in getMutableHash()
38 if (hashes.find(path) == hashes.end()) { in getMutableHash()
39 it = hashes.insert(it, {path, Hash(path)}); in getMutableHash()
45 const Hash& Hash::getHash(const std::string& path) { in getHash() argument
46 return getMutableHash(path); in getHash()
49 void Hash::clearHash(const std::string& path) { in clearHash() argument
50 getMutableHash(path).mHash = kEmptyHash; in clearHash()
53 static std::vector<uint8_t> sha256File(const std::string& path) { in sha256File() argument
54 std::ifstream stream(path); in sha256File()
[all …]
/system/vold/
DAppFuseUtil.cpp36 static android::status_t GetMountPath(uid_t uid, const std::string& name, std::string* path) { in GetMountPath() argument
47 *path = StringPrintf("/mnt/appfuse/%d_%s", uid, name.c_str()); in GetMountPath()
51 static android::status_t Mount(int device_fd, const std::string& path) { in Mount() argument
63 TEMP_FAILURE_RETRY(mount("/dev/fuse", path.c_str(), "fuse", in Mount()
66 PLOG(ERROR) << "Failed to mount " << path; in Mount()
73 static android::status_t RunCommand(const std::string& command, uid_t uid, const std::string& path, in RunCommand() argument
76 LOG(DEBUG) << "Run app fuse command " << command << " for the path " << path << " and uid " in RunCommand()
81 return Mount(device_fd, path); in RunCommand()
85 if (umount2(path.c_str(), UMOUNT_NOFOLLOW | MNT_DETACH) != 0 && errno != EINVAL && in RunCommand()
90 if (rmdir(path.c_str()) != 0) { in RunCommand()
[all …]
/system/tools/aidl/
Dimport_resolver.cpp41 for (string path : import_paths) { in ImportResolver() local
42 if (path.empty()) { in ImportResolver()
43 path = "."; in ImportResolver()
45 if (path[path.size() - 1] != OS_PATH_SEPARATOR) { in ImportResolver()
46 path += OS_PATH_SEPARATOR; in ImportResolver()
48 import_paths_.push_back(std::move(path)); in ImportResolver()
64 for (string path : import_paths_) { in FindImportFile() local
65 path = path + relative_path; in FindImportFile()
66 if (io_delegate_.FileIsReadable(path)) { in FindImportFile()
67 found_paths.emplace_back(path); in FindImportFile()
/system/media/audio_route/
Daudio_route.c89 struct mixer_path *path; member
134 static void path_print(struct audio_route *ar, struct mixer_path *path)
139 ALOGE("Path: %s, length: %d", path->name, path->length);
140 for (i = 0; i < path->length; i++) {
141 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
145 for (j = 0; j < path->setting[i].num_values; j++)
146 ALOGE(" id=%d value=0x%02x", j, path->setting[i].value.bytes[j]);
148 for (j = 0; j < path->setting[i].num_values; j++)
149 ALOGE(" id=%d value=%d", j, path->setting[i].value.enumerated[j]);
151 for (j = 0; j < path->setting[i].num_values; j++)
[all …]
/system/bt/test/
Drun_host_unit_tests.py46 if not os.path.isdir(dir):
65 current_path = os.path.abspath(os.getcwd())
66 while current_path and os.path.isdir(current_path):
67 soong_ui_bash_path = os.path.join(current_path, SOONG_UI_BASH)
68 if os.path.isfile(soong_ui_bash_path):
74 parent_path = os.path.abspath(os.path.join(current_path, os.pardir))
91 (os.path.join(ANDROID_BUILD_TOP, SOONG_UI_BASH), '--dumpvar-mode',
106 value = os.path.join(os.path.join(ANDROID_BUILD_TOP, 'out'), 'dist')
107 if not os.path.isdir(value):
108 if os.path.exists(value):
[all …]
Dgen_coverage.py158 os.path.join(test_name, "index.html") + "\'>" + test_name +
183 source_file = os.path.join(
184 os.path.join(WORKING_DIR, tests[0]['test_name']), "style.css")
185 dest_file = os.path.join(WORKING_DIR, "style.css")
189 f = open(os.path.join(WORKING_DIR, "index.html"), "w")
197 test_cmd = os.path.join(os.path.join(test_root, test_name), test_name)
198 if not os.path.isfile(test_cmd):
204 profraw_path = os.path.join(WORKING_DIR,
205 os.path.join(test_name, profraw_file_name))
217 if not os.path.isfile(profraw_path):
[all …]
/system/tools/hidl/c2hal/test/
Dbuild_all.py20 from os.path import isfile, join as path_join
29 path = args.path
32 success, failure = genFiles(path, is_open_gl)
48 def genFiles(path, is_open_gl): argument
52 for header in sorted(headers(path)):
62 command += [path_join(path, header)]
73 def headers(path): argument
75 for item in listdir(path):
76 if not isfile(path_join(path, item)):
/system/sepolicy/tests/
Dfc_sort.py7 path = None variable in FileContextsNode
16 def __init__(self, path, fileType, context, meta, stemLen, strLen, line): argument
17 self.path = path
29 def getStemLen(path): argument
33 while i < len(path):
34 if path[i] == "\\":
36 elif path[i] in metaChars:
43 def getIsMeta(path): argument
49 if c in path:
52 if c in path:
[all …]
/system/core/libprocessgroup/
Dprocessgroup.cpp58 bool CgroupGetControllerPath(const std::string& cgroup_name, std::string* path) { in CgroupGetControllerPath() argument
65 if (path) { in CgroupGetControllerPath()
66 *path = controller.path(); in CgroupGetControllerPath()
72 bool CgroupGetAttributePath(const std::string& attr_name, std::string* path) { in CgroupGetAttributePath() argument
80 if (path) { in CgroupGetAttributePath()
81 *path = StringPrintf("%s/%s", attr->controller()->path(), attr->file_name().c_str()); in CgroupGetAttributePath()
87 bool CgroupGetAttributePathForTask(const std::string& attr_name, int tid, std::string* path) { in CgroupGetAttributePathForTask() argument
95 if (!attr->GetPathForTask(tid, path)) { in CgroupGetAttributePathForTask()
160 auto path = StringPrintf("%s/%s", uid_path.c_str(), dir->d_name); in RemoveUidProcessGroups() local
161 LOG(VERBOSE) << "Removing " << path; in RemoveUidProcessGroups()
[all …]
/system/memory/libmeminfo/
Dsysmeminfo.cpp48 bool SysMemInfo::ReadMemInfo(const char* path) { in ReadMemInfo() argument
49 return ReadMemInfo(path, SysMemInfo::kDefaultSysMemInfoTags.size(), in ReadMemInfo()
60 bool SysMemInfo::ReadMemInfo(std::vector<uint64_t>* out, const char* path) { in ReadMemInfo() argument
64 &*SysMemInfo::kDefaultSysMemInfoTags.begin(), out->data(), path); in ReadMemInfo()
68 const char* path) { in ReadMemInfo() argument
69 return ReadMemInfo(path, ntags, tags, [&]([[maybe_unused]] std::string_view tag, uint64_t val) { in ReadMemInfo()
85 bool SysMemInfo::ReadMemInfo(const char* path, size_t ntags, const std::string_view* tags, in ReadMemInfo() argument
88 int fd = open(path, O_RDONLY | O_CLOEXEC); in ReadMemInfo()
90 PLOG(ERROR) << "Failed to open file :" << path; in ReadMemInfo()
123 PLOG(ERROR) << "Failed to parse line:" << lineno + 1 << " in file: " << path; in ReadMemInfo()
[all …]
/system/security/identity/
DUtil.cpp50 optional<vector<uint8_t>> fileGetContents(const string& path) { in fileGetContents() argument
51 int fd = open(path.c_str(), O_RDONLY); in fileGetContents()
53 PLOG(ERROR) << "Error opening " << path; in fileGetContents()
59 PLOG(ERROR) << "Error statting " << path; in fileGetContents()
71 PLOG(ERROR) << "Failed reading from '" << path << "'"; in fileGetContents()
83 bool fileSetContents(const string& path, const vector<uint8_t>& data) { in fileSetContents() argument
87 string tempNameStr = path + ".XXXXXX"; in fileSetContents()
96 PLOG(ERROR) << "Error creating temp file for '" << path << "'"; in fileSetContents()
105 PLOG(ERROR) << "Failed writing into temp file for '" << path << "'"; in fileSetContents()
114 PLOG(ERROR) << "Failed fsyncing temp file for '" << path << "'"; in fileSetContents()
[all …]

12345678910>>...29