Home | History | Annotate | Download | only in init

Lines Matching refs:string

26 #include <string.h>
63 const std::string kDefaultAndroidDtDir("/proc/device-tree/firmware/android/");
65 // DecodeUid() - decodes and returns the given string, which can be either the
67 Result<uid_t> DecodeUid(const std::string& name) {
116 std::string secontext;
163 Result<std::string> ReadFile(const std::string& path) {
180 std::string content;
187 static int OpenFile(const std::string& path, int flags, mode_t mode) {
188 std::string secontext;
204 Result<Success> WriteFile(const std::string& path, const std::string& content) {
216 bool mkdir_recursive(const std::string& path, mode_t mode) {
217 std::string::size_type slash = 0;
218 while ((slash = path.find('/', slash + 1)) != std::string::npos) {
246 const std::function<void(const std::string&, const std::string&, bool)>& fn) {
247 std::string cmdline;
251 std::vector<std::string> pieces = android::base::Split(entry, "=");
258 bool make_dir(const std::string& path, mode_t mode) {
259 std::string secontext;
278 std::string bytes_to_hex(const uint8_t* bytes, size_t bytes_len) {
279 std::string hex("0x");
296 bool expand_props(const std::string& src, std::string* dst) {
304 * of the string.
330 std::string prop_name;
331 std::string def_val;
337 LOG(ERROR) << "unexpected end of string in '" << src << "', looking for }";
340 prop_name = std::string(c, end);
358 std::string prop_val = android::base::GetProperty(prop_name, "");
374 static std::string init_android_dt_dir() {
376 std::string android_dt_dir = kDefaultAndroidDtDir;
379 [&](const std::string& key, const std::string& value, bool in_qemu) {
389 const std::string& get_android_dt_dir() {
391 static const std::string kAndroidDtDir = init_android_dt_dir();
397 bool read_android_dt_file(const std::string& sub_path, std::string* dt_content) {
398 const std::string file_name = get_android_dt_dir() + sub_path;
408 bool is_android_dt_value_expected(const std::string& sub_path, const std::string& expected_content) {
409 std::string dt_content;
418 bool IsLegalPropertyName(const std::string& name) {