Home
last modified time | relevance | path

Searched refs:filename (Results 1 – 25 of 252) sorted by relevance

1234567891011

/system/extras/memory_replay/
DFile.cpp34 std::string ZipGetContents(const char* filename) { in ZipGetContents() argument
36 if (OpenArchive(filename, &archive) != 0) { in ZipGetContents()
79 void GetUnwindInfo(const char* filename, AllocEntry** entries, size_t* num_entries) { in GetUnwindInfo() argument
93 if (android::base::EndsWith(filename, ".zip")) { in GetUnwindInfo()
94 contents = ZipGetContents(filename); in GetUnwindInfo()
95 } else if (!android::base::ReadFileToString(filename, &contents)) { in GetUnwindInfo()
96 errx(1, "Unable to get contents of %s", filename); in GetUnwindInfo()
99 errx(1, "Unable to get contents of %s", filename); in GetUnwindInfo()
134 if (android::base::EndsWith(filename, ".zip")) { in GetUnwindInfo()
135 contents = ZipGetContents(filename); in GetUnwindInfo()
[all …]
/system/libufdt/tests/src/
Dutil.c48 char *load_file(const char *filename, size_t *len_ptr) { in load_file() argument
49 FILE *fp = fopen(filename, "r"); in load_file()
61 int write_buf_to_file(const char *filename, in write_buf_to_file() argument
66 fout = fopen(filename, "wb"); in write_buf_to_file()
82 int write_fdt_to_file(const char *filename, const void *fdt) { in write_fdt_to_file() argument
83 return write_buf_to_file(filename, fdt, fdt_totalsize(fdt)); in write_fdt_to_file()
Dextract_dtb.c47 int find_and_write_dtb(const char *filename, in find_and_write_dtb() argument
76 printf("Output %s\n", filename); in find_and_write_dtb()
85 if (write_fdt_to_file(filename, fdt_ptr) != 0) { in find_and_write_dtb()
86 fprintf(stderr, "Write file error: %s\n", filename); in find_and_write_dtb()
107 char filename[128]; in extract_dtbs() local
112 snprintf(filename, sizeof(filename), "%s.%d", out_dtb_filename, index); in extract_dtbs()
113 tag_pos = find_and_write_dtb(filename, buf, buf_size); in extract_dtbs()
Dutil.h22 char *load_file(const char *filename, size_t *len_ptr);
23 int write_buf_to_file(const char *filename, const void *buf, size_t buf_size);
24 int write_fdt_to_file(const char *filename, const void *fdt);
/system/extras/pagecache/
Dpagecache.py30 filename, filesize = self._inode_to_filename[(device_number, inode)]
31 if filename not in self._file_pages:
32 self._file_pages[filename] = [1, 0]
34 self._file_pages[filename][0] += 1
38 if filename not in self._file_size:
39 self._file_size[filename] = filesize
43 filename, filesize = self._inode_to_filename[(device_number, inode)]
44 if filename not in self._file_pages:
45 self._file_pages[filename] = [0, 1]
47 self._file_pages[filename][1] += 1
[all …]
/system/bt/gd/dumpsys/bundler/
Dbundler.cc43 bool LoadBinarySchema(const char* filename, std::string* binary_schema) { in LoadBinarySchema() argument
44 assert(filename != nullptr); in LoadBinarySchema()
46 if (!flatbuffers::LoadFile(filename, helper::AsBinaryFile, binary_schema)) { in LoadBinarySchema()
47 fprintf(stderr, "Unable to open binary flatbuffer schema file:%s\n", filename); in LoadBinarySchema()
86 for (auto filename : filenames) { in CreateBinarySchemaBundle() local
88 if (!LoadBinarySchema(filename.c_str(), &string_schema)) { in CreateBinarySchemaBundle()
89 fprintf(stderr, "Unable to load binary schema from filename:%s\n", filename.c_str()); in CreateBinarySchemaBundle()
94 fprintf(stderr, "Failed verification on binary schema filename:%s\n", filename.c_str()); in CreateBinarySchemaBundle()
100 … fprintf(stderr, "Unable to find root table for binary flatbuffer schema:%s\n", filename.c_str()); in CreateBinarySchemaBundle()
195 const char* filename = opts.filename; in ReadBundledSchema() local
[all …]
/system/update_engine/common/
Dprefs.cc149 base::FilePath filename; in GetKey() local
150 TEST_AND_RETURN_FALSE(GetFileNameForKey(key, &filename)); in GetKey()
151 if (!base::ReadFileToString(filename, value)) { in GetKey()
159 base::FilePath filename; in GetSubKeys() local
160 TEST_AND_RETURN_FALSE(GetFileNameForKey(ns, &filename)); in GetSubKeys()
165 auto filename_str = filename.value(); in GetSubKeys()
176 base::FilePath filename; in SetKey() local
177 TEST_AND_RETURN_FALSE(GetFileNameForKey(key, &filename)); in SetKey()
178 if (!base::DirectoryExists(filename.DirName())) { in SetKey()
181 TEST_AND_RETURN_FALSE(base::CreateDirectory(filename.DirName())); in SetKey()
[all …]
/system/core/libutils/
DTokenizer.cpp34 Tokenizer::Tokenizer(const String8& filename, FileMap* fileMap, char* buffer, in Tokenizer() argument
36 mFilename(filename), mFileMap(fileMap), in Tokenizer()
48 status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) { in open() argument
52 int fd = ::open(filename.string(), O_RDONLY); in open()
55 ALOGE("Error opening file '%s': %s", filename.string(), strerror(errno)); in open()
60 ALOGE("Error getting size of file '%s': %s", filename.string(), strerror(errno)); in open()
82 ALOGE("Error reading file '%s': %s", filename.string(), strerror(errno)); in open()
91 *outTokenizer = new Tokenizer(filename, fileMap, buffer, ownBuffer, length); in open()
99 status_t Tokenizer::fromContents(const String8& filename, in fromContents() argument
101 *outTokenizer = new Tokenizer(filename, nullptr, in fromContents()
/system/tools/aidl/
Dparser.cpp28 std::unique_ptr<Parser> Parser::Parse(const std::string& filename, in Parse() argument
32 unique_ptr<string> raw_buffer = io_delegate.GetFileContents(filename); in Parse()
34 AIDL_ERROR(filename) << "Error while opening file for parsing"; in Parse()
42 std::unique_ptr<Parser> parser(new Parser(filename, *raw_buffer, typenames)); in Parse()
63 Parser::Parser(const std::string& filename, std::string& raw_buffer, in Parser() argument
65 : filename_(filename), typenames_(typenames) { in Parser()
/system/extras/ioshark/
Dcompile_ioshark_subr.c35 static int filename_cache_lookup(char *filename);;
60 free(s->filename); in files_db_write_objects()
75 if (strcmp(db_node->filename, pathname) == 0) in files_db_lookup()
82 void *files_db_add(char *filename) in files_db_add() argument
87 if ((db_node = files_db_lookup(filename))) in files_db_add()
89 hash = jenkins_one_at_a_time_hash(filename, strlen(filename)); in files_db_add()
92 db_node->filename = strdup(filename); in files_db_add()
94 filename_cache_lookup(filename); in files_db_add()
163 filename_cache_lookup(char *filename) in filename_cache_lookup() argument
169 if (strcmp(filename_cache[i].path, filename) == 0) in filename_cache_lookup()
[all …]
Dioshark_bench.h45 char *filename; member
77 files_db_update_filename(void *node, char *filename) in files_db_update_filename() argument
79 ((struct files_db_s *)node)->filename = strdup(filename); in files_db_update_filename()
97 return (((struct files_db_s *)node)->filename); in files_db_get_filename()
154 int is_readonly_mount(char *filename, size_t size);
Dcompile_ioshark.h20 char *filename; member
68 return (((struct files_db_s *)node)->filename); in files_db_get_filename()
73 void *files_db_add(char *filename);
74 void *files_db_lookup(char *filename);
/system/timezone/
Ddownload-iana-files.py35 def FtpRetrieveFile(ftp, filename): argument
36 ftp.retrbinary('RETR %s' % filename, open(filename, 'wb').write)
57 for filename in ftp.nlst():
58 if "/" in filename:
62 if filename.startswith(file_prefix) and filename.endswith('.tar.gz'):
63 iana_tar_filenames.append(filename)
Dtzdatautil.py25 for filename in os.listdir(dir_name):
26 if filename.startswith(file_prefix) and filename.endswith('.tar.gz'):
27 matching_files.append(filename);
/system/tools/hidl/
DLocation.cpp24 Position::Position(std::string filename, size_t line, size_t column) in Position() argument
25 : mFilename(filename), mLine(line), mColumn(column) {} in Position()
27 const std::string& Position::filename() const { in filename() function in android::Position
48 if (!pos.filename().empty()) { in operator <<()
49 ostr << pos.filename() << ":"; in operator <<()
95 Position last = Position(loc.end().filename(), loc.end().line(), in operator <<()
98 if (loc.begin().filename() != last.filename()) { in operator <<()
/system/core/gatekeeperd/
Dgatekeeperd.cpp80 char filename[21]; in store_sid() local
81 snprintf(filename, sizeof(filename), "%u", uid); in store_sid()
82 int fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR); in store_sid()
84 ALOGE("could not open file: %s: %s", filename, strerror(errno)); in store_sid()
107 const char *filename = ".coldboot"; in mark_cold_boot() local
108 if (access(filename, F_OK) == -1) { in mark_cold_boot()
109 int fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR); in mark_cold_boot()
111 ALOGE("could not open file: %s : %s", filename, strerror(errno)); in mark_cold_boot()
121 char filename[21]; in maybe_store_sid() local
122 snprintf(filename, sizeof(filename), "%u", uid); in maybe_store_sid()
[all …]
/system/bt/osi/src/
Dconfig.cc97 std::unique_ptr<config_t> config_new(const char* filename) { in config_new() argument
98 CHECK(filename != nullptr); in config_new()
102 FILE* fp = fopen(filename, "rt"); in config_new()
104 LOG(ERROR) << __func__ << ": unable to open file '" << filename in config_new()
117 std::string checksum_read(const char* filename) { in checksum_read() argument
118 base::FilePath path(filename); in checksum_read()
120 LOG(ERROR) << __func__ << ": unable to locate file '" << filename << "'"; in checksum_read()
125 LOG(ERROR) << __func__ << ": unable to read file '" << filename << "'"; in checksum_read()
263 bool config_save(const config_t& config, const std::string& filename) { in config_save() argument
264 CHECK(!filename.empty()); in config_save()
[all …]
/system/extras/pssbench/
Dmain.cpp17 char filename[64]; in get_pss() local
18 snprintf(filename, sizeof(filename), "/proc/%" PRId32 "/%s", pid, in get_pss()
21 fprintf(stderr, "smaps:[%s]\n", filename); in get_pss()
23 FILE * file = fopen(filename, "r"); in get_pss()
/system/extras/simpleperf/
Dthread_tree.cpp105 const std::string& filename) { in AddKernelMap() argument
110 Dso* dso = FindKernelDsoOrNew(filename); in AddKernelMap()
114 Dso* ThreadTree::FindKernelDsoOrNew(const std::string& filename) { in FindKernelDsoOrNew() argument
115 if (filename == DEFAULT_KERNEL_MMAP_NAME || in FindKernelDsoOrNew()
116 filename == DEFAULT_KERNEL_MMAP_NAME_PERF) { in FindKernelDsoOrNew()
119 auto it = module_dso_tree_.find(filename); in FindKernelDsoOrNew()
121 module_dso_tree_[filename] = Dso::CreateDso(DSO_KERNEL_MODULE, filename); in FindKernelDsoOrNew()
122 it = module_dso_tree_.find(filename); in FindKernelDsoOrNew()
128 uint64_t pgoff, const std::string& filename, uint32_t flags) { in AddThreadMap() argument
130 Dso* dso = FindUserDsoOrNew(filename, start_addr); in AddThreadMap()
[all …]
/system/extras/verity/fec/
Dimage.cpp173 bool image_save(const std::string& filename, image *ctx) in image_save() argument
176 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), in image_save()
180 FATAL("failed to open file '%s: %s'\n", filename.c_str(), in image_save()
192 bool image_ecc_new(const std::string& filename, image *ctx) in image_ecc_new() argument
196 ctx->fec_filename = filename.c_str(); in image_ecc_new()
212 bool image_ecc_load(const std::string& filename, image *ctx) in image_ecc_load() argument
214 int fd = TEMP_FAILURE_RETRY(open(filename.c_str(), O_RDONLY)); in image_ecc_load()
217 FATAL("failed to open file '%s': %s\n", filename.c_str(), in image_ecc_load()
222 FATAL("failed to seek to header in '%s': %s\n", filename.c_str(), in image_ecc_load()
233 filename.c_str(), strerror(errno)); in image_ecc_load()
[all …]
/system/core/libsparse/
Dsimg2simg.cpp48 char filename[4096]; in main() local
88 ret = snprintf(filename, sizeof(filename), "%s.%d", argv[2], i); in main()
89 if (ret >= (int)sizeof(filename)) { in main()
94 out = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664); in main()
/system/extras/ext4_utils/
Dblk_alloc_to_base_fs.cpp32 static void usage(char *filename) in usage() argument
34 fprintf(stderr, "Usage: %s input_blk_alloc_file output_base_fs_file \n", filename); in usage()
40 char filename[MAX_PATH+1], file_version[MAX_FILE_VERSION+1], *spaced_allocs = NULL; in main() local
70 while(fscanf(blk_alloc_file, "%" ___STRING(MAX_PATH) "s ", filename) != EOF) { in main()
72 fprintf(base_fs_file, "%s ", filename); in main()
/system/sepolicy/tools/sepolicy-analyze/
Dutils.c25 bool load_policy(char *filename, policydb_t * policydb, struct policy_file *pf) in load_policy() argument
32 fd = open(filename, O_RDONLY); in load_policy()
34 fprintf(stderr, "Can't open '%s': %s\n", filename, strerror(errno)); in load_policy()
38 fprintf(stderr, "Can't stat '%s': %s\n", filename, strerror(errno)); in load_policy()
43 fprintf(stderr, "Can't mmap '%s': %s\n", filename, strerror(errno)); in load_policy()
/system/extras/boottime_tools/bootio/
Dbootio_collector.cpp66 int ReadIo(char *filename, AppSample *sample) { in ReadIo() argument
71 file = fopen(filename, "r"); in ReadIo()
91 int ReadStatForName(char *filename, AppData *app) { in ReadStatForName() argument
95 file = fopen(filename, "r"); in ReadStatForName()
112 int ReadStat(char *filename, AppSample *sample) { in ReadStat() argument
116 file = fopen(filename, "r"); in ReadStat()
146 int ReadCmdline(char *filename, AppData *app) { in ReadCmdline() argument
151 file = fopen(filename, "r"); in ReadCmdline()
168 char filename[64]; in ReadProcData() local
183 sprintf(filename, PID_STAT_FILE, pid); in ReadProcData()
[all …]
/system/extras/simpleperf/app_api/java/com/android/simpleperf/
DRecordOptions.java54 public RecordOptions setOutputFilename(@NonNull String filename) { in setOutputFilename() argument
55 mOutputFilename = filename; in setOutputFilename()
132 String filename = mOutputFilename; in toRecordArgs() local
133 if (filename == null) { in toRecordArgs()
134 filename = getDefaultOutputFilename(); in toRecordArgs()
137 args.add(filename); in toRecordArgs()

1234567891011