/system/incremental_delivery/incfs/ |
D | path.cpp | 32 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 …]
|
D | MountRegistry.cpp | 40 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/bt/gd/cert/ |
D | bluetooth_packets_python3_setup.py | 32 PYBIND11_INCLUDE_DIR = os.path.join(ANDROID_BUILD_TOP, "external/python/pybind11/include") 33 GD_DIR = os.path.join(ANDROID_BUILD_TOP, "system/bt/gd") 34 BT_PACKETS_GEN_DIR = os.path.join(ANDROID_BUILD_TOP, 36 BT_PACKETS_PY3_GEN_DIR = os.path.join(ANDROID_BUILD_TOP, 40 os.path.join(GD_DIR, "l2cap/fcs.cc"), 41 os.path.join(GD_DIR, "packet/bit_inserter.cc"), 42 os.path.join(GD_DIR, "packet/byte_inserter.cc"), 43 os.path.join(GD_DIR, "packet/byte_observer.cc"), 44 os.path.join(GD_DIR, "packet/iterator.cc"), 45 os.path.join(GD_DIR, "packet/fragmenting_inserter.cc"), [all …]
|
/system/core/libunwindstack/benchmarks/ |
D | MapsBenchmark.cpp | 81 CreateMap(initial_maps.path, kNumSmallMaps, 2); in BM_local_updatable_maps_reparse_double_initial_small() 84 CreateMap(reparse_maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_double_initial_small() 86 ReparseBenchmark(state, initial_maps.path, kNumSmallMaps / 2, reparse_maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_double_initial_small() 92 CreateMap(initial_maps.path, kNumLargeMaps, 2); in BM_local_updatable_maps_reparse_double_initial_large() 95 CreateMap(reparse_maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_double_initial_large() 97 ReparseBenchmark(state, initial_maps.path, kNumLargeMaps / 2, reparse_maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_double_initial_large() 104 CreateMap(maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_same_maps_small() 106 ReparseBenchmark(state, maps.path, kNumSmallMaps, maps.path, kNumSmallMaps); in BM_local_updatable_maps_reparse_same_maps_small() 112 CreateMap(maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_same_maps_large() 114 ReparseBenchmark(state, maps.path, kNumLargeMaps, maps.path, kNumLargeMaps); in BM_local_updatable_maps_reparse_same_maps_large() [all …]
|
/system/extras/libperfmgr/tests/ |
D | NodeLooperThreadTest.cc | 39 "n0", tf->path, {{"n0_value0"}, {"n0_value1"}, {"n0_value2"}}, 2, in SetUp() 44 "n1", tf->path, {{"n1_value0"}, {"n1_value1"}, {"n1_value2"}}, 2, in SetUp() 57 static inline void _VerifyPathValue(const std::string& path, in _VerifyPathValue() argument 60 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue() 69 _VerifyPathValue(files_[0]->path, ""); in TEST_F() 70 _VerifyPathValue(files_[1]->path, "n1_value2"); in TEST_F() 85 _VerifyPathValue(files_[0]->path, "n0_value0"); in TEST_F() 86 _VerifyPathValue(files_[1]->path, "n1_value1"); in TEST_F() 88 _VerifyPathValue(files_[0]->path, "n0_value2"); in TEST_F() 89 _VerifyPathValue(files_[1]->path, "n1_value1"); in TEST_F() [all …]
|
D | FileNodeTest.cc | 35 static inline void _VerifyPathValue(const std::string& path, in _VerifyPathValue() argument 38 EXPECT_TRUE(android::base::ReadFileToString(path, &s)) << strerror(errno); in _VerifyPathValue() 45 FileNode t("t", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, false); in TEST() 46 _VerifyPathValue(tf.path, ""); in TEST() 52 FileNode t("t", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, true); in TEST() 53 _VerifyPathValue(tf.path, "value1"); in TEST() 55 FileNode t2("t2", tf2.path, {{"value0"}, {"value1"}, {"value2"}}, 0, true); in TEST() 56 _VerifyPathValue(tf2.path, "value0"); in TEST() 62 FileNode t("test_dump", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, in TEST() 68 android::base::StringPrintf("test_dump\t%s\t1\tvalue1\n", tf.path)); in TEST() [all …]
|
/system/apex/apexd/ |
D | apexd_utils.h | 91 Result<void> WalkDir(const std::string& path, Fn fn) { in WalkDir() argument 94 auto it = fs::directory_iterator(path, ec); in WalkDir() 101 return Error() << "Can't open " << path in WalkDir() 108 Result<std::vector<std::string>> ReadDir(const std::string& path, FilterFn fn) { in ReadDir() argument 112 auto status = WalkDir(path, [&](const fs::directory_entry& entry) { in ReadDir() 114 ret.push_back(entry.path()); in ReadDir() 123 inline bool IsEmptyDirectory(const std::string& path) { in IsEmptyDirectory() argument 124 auto res = ReadDir(path, [](auto _) { return true; }); in IsEmptyDirectory() 128 inline Result<void> createDirIfNeeded(const std::string& path, mode_t mode) { in createDirIfNeeded() argument 131 if (stat(path.c_str(), &stat_data) != 0) { in createDirIfNeeded() [all …]
|
/system/sepolicy/tools/ |
D | sepolicy_cleanup_check.sh | 39 …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" 66 …path=`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/libcutils/ |
D | fs.cpp | 42 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 …]
|
D | canned_fs_config.cpp | 29 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/libbase/ |
D | file.cpp | 56 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 …]
|
D | file_test.cpp | 48 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/init/ |
D | util_test.cpp | 44 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() 90 EXPECT_RESULT_OK(WriteFile(tf.path, contents)); in TEST() 92 auto read_back_contents = ReadFile(tf.path); in TEST() 101 std::string path = android::base::StringPrintf("%s/does-not-exist", test_dir.path); in TEST() local 102 EXPECT_RESULT_OK(WriteFile(path, s)); in TEST() [all …]
|
D | devices.cpp | 58 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/ |
D | BatteryMonitor.cpp | 177 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/linkerconfig/modules/ |
D | namespace.cc | 33 ns.AddSearchPath(apex_info.path + "/${LIB}"); in InitializeWithApex() 34 ns.AddPermittedPath(apex_info.path + "/${LIB}"); in InitializeWithApex() 78 void Namespace::AddSearchPath(const std::string& path) { in AddSearchPath() argument 79 search_paths_.push_back(path); in AddSearchPath() 81 if (RequiresAsanPath(path)) { in AddSearchPath() 82 asan_search_paths_.push_back(CreateAsanPath(path)); in AddSearchPath() 84 asan_search_paths_.push_back(path); in AddSearchPath() 87 void Namespace::AddPermittedPath(const std::string& path) { in AddPermittedPath() argument 88 permitted_paths_.push_back(path); in AddPermittedPath() 90 if (RequiresAsanPath(path)) { in AddPermittedPath() [all …]
|
/system/tools/hidl/hashing/ |
D | Hash.cpp | 33 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/ |
D | AppFuseUtil.cpp | 36 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/ |
D | import_resolver.cpp | 42 for (string path : import_paths) { in ImportResolver() local 43 if (path.empty()) { in ImportResolver() 44 path = "."; in ImportResolver() 46 if (path[path.size() - 1] != OS_PATH_SEPARATOR) { in ImportResolver() 47 path += OS_PATH_SEPARATOR; in ImportResolver() 49 import_paths_.push_back(std::move(path)); in ImportResolver() 65 for (string path : import_paths_) { in FindImportFile() local 66 path = path + relative_path; in FindImportFile() 67 if (io_delegate_.FileIsReadable(path)) { in FindImportFile() 68 found_paths.emplace_back(path); in FindImportFile()
|
/system/linkerconfig/contents/tests/backward_compatibility/ |
D | testbase.h | 57 const std::string& path) { in ContainsPath() argument 59 if (item == path) { in ContainsPath() 69 const std::string& path) { in ContainsSearchPath() argument 70 if (!ContainsPath(ns->SearchPaths(), path)) { in ContainsSearchPath() 76 if (!ContainsPath(asan_search_path, path)) { in ContainsSearchPath() 80 if (!android::base::StartsWith(path, "/apex") && in ContainsSearchPath() 81 !ContainsPath(asan_search_path, "/data/asan" + path)) { in ContainsSearchPath() 90 const std::string& path) { in ContainsPermittedPath() argument 91 if (!ContainsPath(ns->PermittedPaths(), path)) { in ContainsPermittedPath() 97 if (!ContainsPath(asan_search_path, path)) { in ContainsPermittedPath() [all …]
|
/system/media/audio_route/ |
D | audio_route.c | 83 struct mixer_path *path; member 128 static void path_print(struct audio_route *ar, struct mixer_path *path) 133 ALOGE("Path: %s, length: %d", path->name, path->length); 134 for (i = 0; i < path->length; i++) { 135 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index); 139 for (j = 0; j < path->setting[i].num_values; j++) 140 ALOGE(" id=%d value=0x%02x", j, path->setting[i].value.bytes[j]); 142 for (j = 0; j < path->setting[i].num_values; j++) 143 ALOGE(" id=%d value=%d", j, path->setting[i].value.enumerated[j]); 145 for (j = 0; j < path->setting[i].num_values; j++) [all …]
|
/system/bt/test/ |
D | run_host_unit_tests.py | 46 if not os.path.isdir(dir): 64 current_path = os.path.abspath(os.getcwd()) 65 while current_path and os.path.isdir(current_path): 66 soong_ui_bash_path = os.path.join(current_path, SOONG_UI_BASH) 67 if os.path.isfile(soong_ui_bash_path): 72 parent_path = os.path.abspath(os.path.join(current_path, os.pardir)) 88 …value = get_output_from_command((os.path.join(ANDROID_BUILD_TOP, SOONG_UI_BASH), '--dumpvar-mode',… 103 value = os.path.join(os.path.join(ANDROID_BUILD_TOP, 'out'), 'dist') 104 if not os.path.isdir(value): 105 if os.path.exists(value): [all …]
|
D | gen_coverage.py | 156 …f.write("<tr class='light-row'><td><pre><a href=\'" + os.path.join(test_name, "index.html") + "\'>… 181 source_file = os.path.join(os.path.join(WORKING_DIR, tests[0]['test_name']), "style.css") 182 dest_file = os.path.join(WORKING_DIR, "style.css") 186 f = open(os.path.join(WORKING_DIR, "index.html"), "w") 194 test_cmd = os.path.join(os.path.join(test_root, test_name), test_name) 195 if not os.path.isfile(test_cmd): 200 profraw_path = os.path.join(WORKING_DIR, os.path.join(test_name, profraw_file_name)) 210 if not os.path.isfile(profraw_path): 220 cmd.append(os.path.join(get_android_root_or_die(), LLVM_MERGE + " merge ")) 222 test_working_dir = os.path.join(WORKING_DIR, test_name) [all …]
|
/system/tools/hidl/c2hal/test/ |
D | build_all.py | 20 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/ |
D | fc_sort.py | 7 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 …]
|