/system/core/libcutils/ |
D | fs_config_test.cpp | 42 const char* prefix; member 78 const std::string& prefix) { in check_unique() argument 81 std::string alternate = "system/" + prefix; in check_unique() 96 if (android::base::StartsWith(path, prefix)) { in check_unique() 98 path = alternate + path.substr(prefix.size()); in check_unique() 114 path = prefix + path.substr(alternate.size()); in check_unique() 129 const std::string& prefix) { in check_unique() argument 136 for (size_t idx = 0; paths[idx].prefix; ++idx) { in check_unique() 142 paths_tmp.push_back(paths[idx].prefix); in check_unique() 145 return check_unique(paths_tmp, config, prefix) || retval; in check_unique() [all …]
|
D | fs_config.cpp | 267 static bool fs_config_cmp(bool dir, const char* prefix, size_t len, const char* path, size_t plen) { in fs_config_cmp() argument 268 std::string pattern(prefix, len); in fs_config_cmp() 328 char* prefix; in fs_config() local 335 prefix = static_cast<char*>(calloc(1, remainder)); in fs_config() 336 if (!prefix) { in fs_config() 340 if (TEMP_FAILURE_RETRY(read(fd, prefix, remainder)) != remainder) { in fs_config() 341 free(prefix); in fs_config() 345 len = strnlen(prefix, remainder); in fs_config() 347 free(prefix); in fs_config() 351 if (fs_config_cmp(dir, prefix, len, path, plen)) { in fs_config() [all …]
|
D | android_get_control_file.cpp | 49 int __android_get_control_from_env(const char* prefix, const char* name) { in __android_get_control_from_env() argument 50 if (!prefix || !name) return -1; in __android_get_control_from_env() 53 if (asprintf(&key, "%s%s", prefix, name) < 0) return -1; in __android_get_control_from_env()
|
/system/bt/btif/src/ |
D | btif_keystore.cc | 48 void set_encrypt_key_or_remove_key(std::string prefix, in set_encrypt_key_or_remove_key() argument 50 VLOG(2) << __func__ << " prefix: " << prefix; in set_encrypt_key_or_remove_key() 53 LOG(WARNING) << __func__ << " callback isn't ready. prefix: " << prefix; in set_encrypt_key_or_remove_key() 58 key_map[prefix] = decryptedString; in set_encrypt_key_or_remove_key() 63 base::Unretained(callbacks), prefix, decryptedString)); in set_encrypt_key_or_remove_key() 66 std::string get_key(std::string prefix) override { in get_key() argument 67 VLOG(2) << __func__ << " prefix: " << prefix; in get_key() 70 LOG(WARNING) << __func__ << " callback isn't ready. prefix: " << prefix; in get_key() 76 std::map<std::string, std::string>::iterator iter = key_map.find(prefix); in get_key() 78 decryptedString = callbacks->get_key(prefix); in get_key() [all …]
|
/system/core/libutils/include/utils/ |
D | CallStack.h | 67 const char* prefix = nullptr) const; 70 void dump(int fd, int indent = 0, const char* prefix = nullptr) const; 73 String8 toString(const char* prefix = nullptr) const; 138 static String8 ALWAYS_INLINE stackToString(const char* prefix = nullptr, 141 return stackToStringInternal(prefix, stack); 143 return String8::format("%s<CallStack package not linked>", (prefix ? prefix : "")); 147 static String8 ALWAYS_INLINE stackToString(const char* prefix = nullptr, 149 return String8::format("%s<CallStack package not linked>", (prefix ? prefix : "")); 158 static String8 CALLSTACK_WEAK stackToStringInternal(const char* prefix, const CallStack* stack);
|
D | Printer.h | 48 const char* prefix = nullptr, 69 FdPrinter(int fd, unsigned int indent = 0, const char* prefix = nullptr); 93 String8Printer(String8* target, const char* prefix = nullptr); 107 PrefixPrinter(Printer& printer, const char* prefix);
|
D | ProcessCallStack.h | 46 const char* prefix = nullptr) const; 49 void dump(int fd, int indent = 0, const char* prefix = nullptr) const; 52 String8 toString(const char* prefix = nullptr) const;
|
/system/vold/ |
D | Process.cpp | 47 static bool checkMaps(const std::string& path, const std::string& prefix) { in checkMaps() argument 61 if (android::base::StartsWith(line, prefix)) { in checkMaps() 73 static bool checkSymlink(const std::string& path, const std::string& prefix) { in checkSymlink() argument 76 if (android::base::StartsWith(res, prefix)) { in checkSymlink() 84 int KillProcessesWithOpenFiles(const std::string& prefix, int signal) { in KillProcessesWithOpenFiles() argument 103 found |= checkMaps(path + "/maps", prefix); in KillProcessesWithOpenFiles() 104 found |= checkSymlink(path + "/cwd", prefix); in KillProcessesWithOpenFiles() 105 found |= checkSymlink(path + "/root", prefix); in KillProcessesWithOpenFiles() 106 found |= checkSymlink(path + "/exe", prefix); in KillProcessesWithOpenFiles() 116 found |= checkSymlink(fd_path + "/" + fd_de->d_name, prefix); in KillProcessesWithOpenFiles()
|
/system/core/libutils/ |
D | CallStack.cpp | 53 void CallStack::log(const char* logtag, android_LogPriority priority, const char* prefix) const { in log() 54 LogPrinter printer(logtag, priority, prefix, /*ignoreBlankLines*/false); in log() 58 void CallStack::dump(int fd, int indent, const char* prefix) const { in dump() 59 FdPrinter printer(fd, indent, prefix); in dump() 63 String8 CallStack::toString(const char* prefix) const { in toString() 66 String8Printer printer(&str, prefix); in toString() 94 String8 CallStack::stackToStringInternal(const char* prefix, const CallStack* stack) { in stackToStringInternal() argument 95 return stack->toString(prefix); in stackToStringInternal()
|
D | Printer.cpp | 67 const char* prefix, in LogPrinter() argument 71 mPrefix(prefix ?: ""), in LogPrinter() 98 FdPrinter::FdPrinter(int fd, unsigned int indent, const char* prefix) : in FdPrinter() argument 99 mFd(fd), mIndent(indent), mPrefix(prefix ?: "") { in FdPrinter() 126 String8Printer::String8Printer(String8* target, const char* prefix) : in String8Printer() argument 128 mPrefix(prefix ?: "") { in String8Printer() 152 PrefixPrinter::PrefixPrinter(Printer& printer, const char* prefix) : in PrefixPrinter() argument 153 mPrinter(printer), mPrefix(prefix ?: "") { in PrefixPrinter()
|
/system/linkerconfig/modules/ |
D | namespace.cc | 50 const auto prefix = "namespace." + name_ + "."; in WriteConfig() local 52 writer.WriteLine(prefix + "isolated = " + (is_isolated_ ? "true" : "false")); in WriteConfig() 55 writer.WriteLine(prefix + "visible = true"); in WriteConfig() 58 writer.WriteVars(prefix + "search.paths", search_paths_); in WriteConfig() 59 writer.WriteVars(prefix + "permitted.paths", permitted_paths_); in WriteConfig() 60 writer.WriteVars(prefix + "asan.search.paths", asan_search_paths_); in WriteConfig() 61 writer.WriteVars(prefix + "asan.permitted.paths", asan_permitted_paths_); in WriteConfig() 62 writer.WriteVars(prefix + "whitelisted", whitelisted_); in WriteConfig() 70 writer.WriteLine(prefix + "links = " + android::base::Join(link_list, ",")); in WriteConfig()
|
D | stringutil.cc | 23 std::string TrimPrefix(const std::string& s, const std::string& prefix) { in TrimPrefix() argument 24 if (android::base::StartsWith(s, prefix)) { in TrimPrefix() 25 return s.substr(prefix.size()); in TrimPrefix()
|
D | link.cc | 39 const auto prefix = in WriteConfig() local 42 writer.WriteLine(prefix + "allow_all_shared_libs = true"); in WriteConfig() 44 writer.WriteVars(prefix + "shared_libs", shared_libs_); in WriteConfig()
|
/system/bt/include/hardware/ |
D | bt_keystore.h | 25 virtual void set_encrypt_key_or_remove_key(std::string prefix, 29 virtual std::string get_key(std::string prefix) = 0; 40 virtual void set_encrypt_key_or_remove_key(std::string prefix, 44 virtual std::string get_key(std::string prefix) = 0;
|
/system/libbase/ |
D | strings.cpp | 90 bool StartsWith(std::string_view s, std::string_view prefix) { in StartsWith() argument 91 return s.substr(0, prefix.size()) == prefix; in StartsWith() 94 bool StartsWith(std::string_view s, char prefix) { in StartsWith() argument 95 return !s.empty() && s.front() == prefix; in StartsWith() 98 bool StartsWithIgnoreCase(std::string_view s, std::string_view prefix) { in StartsWithIgnoreCase() argument 99 return s.size() >= prefix.size() && strncasecmp(s.data(), prefix.data(), prefix.size()) == 0; in StartsWithIgnoreCase()
|
/system/media/audio_utils/include/audio_utils/ |
D | FdToString.h | 46 explicit FdToString(const std::string &prefix = "- ", int timeoutMs = 200) 47 : mPrefix(prefix) in mPrefix() argument 93 static std::string reader(int fd, int64_t timeoutTimeNs, std::string prefix) { in reader() argument 112 while (!prefix.empty() && (delim = (char *)memchr(bptr, '\n', red)) != nullptr) { in reader() 113 if (requiresPrefix) ss << prefix; in reader() 121 ss << prefix; in reader()
|
D | ErrorLog.h | 98 std::string dumpToString(const char *prefix = "", size_t lines = 0, int64_t limitNs = 0) const 109 ss << prefix << "Errors: " << mErrors << "\n"; 127 ss << prefix << " Code Freq First time Last time\n"; 132 ss << prefix << std::setw(5) << entry.mCode 151 status_t dump(int fd, const char *prefix = "", size_t lines = 0, int64_t limitNs = 0) const 154 const std::string s = dumpToString(prefix, lines, limitNs); 239 error_log_t *error_log, int fd, const char *prefix, size_t lines, int64_t limit_ns);
|
/system/libbase/include/android-base/ |
D | strings.h | 60 bool StartsWith(std::string_view s, std::string_view prefix); 61 bool StartsWith(std::string_view s, char prefix); 62 bool StartsWithIgnoreCase(std::string_view s, std::string_view prefix); 74 inline bool ConsumePrefix(std::string_view* s, std::string_view prefix) { in ConsumePrefix() argument 75 if (!StartsWith(*s, prefix)) return false; in ConsumePrefix() 76 s->remove_prefix(prefix.size()); in ConsumePrefix()
|
/system/extras/simpleperf/ |
D | SampleDisplayer.h | 119 std::string prefix = " "; in operator() local 121 fprintf(fp, "%s[skipped in brief callgraph mode]\n", prefix.c_str()); in operator() 124 fprintf(fp, "%s|\n", prefix.c_str()); in operator() 125 fprintf(fp, "%s-- %s\n", prefix.c_str(), PrintSampleName(sample).c_str()); in operator() 126 prefix.append(3, ' '); in operator() 128 DisplayCallGraphEntry(fp, 1, prefix, sample->callchain.children[i], in operator() 134 void DisplayCallGraphEntry(FILE* fp, size_t depth, std::string prefix, in DisplayCallGraphEntry() argument 149 prefix += "|"; in DisplayCallGraphEntry() 150 fprintf(fp, "%s\n", prefix.c_str()); in DisplayCallGraphEntry() 152 prefix.back() = ' '; in DisplayCallGraphEntry() [all …]
|
/system/netd/libnetdutils/ |
D | InternetAddressesTest.cpp | 175 IPPrefix prefix; in TEST() local 177 EXPECT_FALSE(IPPrefix::forString("", &prefix)); in TEST() 178 EXPECT_FALSE(IPPrefix::forString("invalid", &prefix)); in TEST() 179 EXPECT_FALSE(IPPrefix::forString("192.0.2.0", &prefix)); in TEST() 180 EXPECT_FALSE(IPPrefix::forString("2001::db8::", &prefix)); in TEST() 182 EXPECT_FALSE(IPPrefix::forString("2001:db8::/", &prefix)); in TEST() 183 EXPECT_FALSE(IPPrefix::forString("2001:db8:://32", &prefix)); in TEST() 184 EXPECT_FALSE(IPPrefix::forString("2001:db8::/32z", &prefix)); in TEST() 185 EXPECT_FALSE(IPPrefix::forString("2001:db8::/32/", &prefix)); in TEST() 186 EXPECT_FALSE(IPPrefix::forString("2001:db8::/0x20", &prefix)); in TEST() [all …]
|
/system/netd/server/ |
D | WakeupController.h | 35 std::string prefix; member 68 netdutils::Status addInterface(const std::string& ifName, const std::string& prefix, 73 netdutils::Status delInterface(const std::string& ifName, const std::string& prefix, 78 const std::string& prefix, uint32_t mark, uint32_t mask);
|
D | WakeupControllerTest.cpp | 48 void(const std::string& prefix, int uid, int ether, int ipNextHeader, 85 mEventListener.onWakeupEvent(args.prefix, args.uid, args.ethertype, args.ipNextHeader, in __anon20e078b50102() 110 char prefix[sizeof(kPrefix)]; in TEST_F() member 127 msg.prefixAttr.nla_len = sizeof(msg.prefixAttr) + sizeof(msg.prefix); in TEST_F() 128 memcpy(msg.prefix, kPrefix, sizeof(kPrefix)); in TEST_F() 160 char prefix[sizeof(kPrefix)]; in TEST_F() member 171 msg.prefixAttr.nla_len = sizeof(msg.prefixAttr) + sizeof(msg.prefix); in TEST_F() 172 memcpy(msg.prefix, kPrefix, sizeof(kPrefix)); in TEST_F() 231 char prefix[sizeof(kPrefix)]; in TEST_F() member 253 msg.prefixAttr.nla_len = sizeof(msg.prefixAttr) + sizeof(msg.prefix); in TEST_F() [all …]
|
D | NetdConstants.cpp | 77 int parsePrefix(const char *prefix, uint8_t *family, void *address, int size, uint8_t *prefixlen) { in parsePrefix() argument 78 if (!prefix || !family || !address || !prefixlen) { in parsePrefix() 83 const char *slash = strchr(prefix, '/'); in parsePrefix() 100 std::string addressString(prefix, slash - prefix); in parsePrefix()
|
/system/tools/hidl/host_utils/ |
D | StringHelper.cpp | 202 bool StringHelper::StartsWith(const std::string &in, const std::string &prefix) { in StartsWith() argument 203 return in.size() >= prefix.size() && in StartsWith() 204 in.substr(0, prefix.size()) == prefix; in StartsWith() 215 std::string StringHelper::LTrim(const std::string &in, const std::string &prefix) { in LTrim() argument 216 if (StartsWith(in, prefix)) { in LTrim() 217 return in.substr(prefix.size()); in LTrim() 236 std::string StringHelper::LTrimAll(const std::string &in, const std::string &prefix) { in LTrimAll() argument 237 if (prefix.empty()) { in LTrimAll() 242 while (StartsWith(copy, prefix)) { in LTrimAll() 243 copy = copy.substr(prefix.size()); in LTrimAll()
|
/system/media/audio_utils/ |
D | PowerLog.cpp | 110 std::string PowerLog::dumpToString(const char *prefix, size_t lines, int64_t limitNs) const in dumpToString() argument 169 ss << prefix << "Signal power history: (none)\n"; in dumpToString() 174 ss << prefix << "Signal power history:\n"; in dumpToString() 205 ss << prefix << " " << audio_utils_time_string_from_ns(time).time in dumpToString() 232 status_t PowerLog::dump(int fd, const char *prefix, size_t lines, int64_t limitNs) const in dump() argument 238 const std::string s = dumpToString(prefix, lines, limitNs); in dump() 270 power_log_t *power_log, int fd, const char *prefix, size_t lines, int64_t limit_ns) in power_log_dump() argument 275 return reinterpret_cast<PowerLog *>(power_log)->dump(fd, prefix, lines, limit_ns); in power_log_dump()
|