Home
last modified time | relevance | path

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

123456789

/system/nfc/halimpl/bcm2079x/adaptation/
DNonVolatileStore.cpp68 char filename[256]; in nfc_hal_nv_co_read() local
75 snprintf(filename, sizeof(filename), "%s%u", fn.c_str(), block); in nfc_hal_nv_co_read()
77 ALOGD("%s: buffer len=%u; file=%s", __func__, nbytes, filename); in nfc_hal_nv_co_read()
78 int fileStream = open(filename, O_RDONLY); in nfc_hal_nv_co_read()
120 char filename[256]; in nfc_hal_nv_co_write() local
128 snprintf(filename, sizeof(filename), "%s%u", fn.c_str(), block); in nfc_hal_nv_co_write()
129 ALOGD("%s: bytes=%u; file=%s", __func__, nbytes, filename); in nfc_hal_nv_co_write()
131 fileStream = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); in nfc_hal_nv_co_write()
186 char filename[256]; in delete_hal_non_volatile_store() local
200 snprintf(filename, sizeof(filename), "%s%u", fn.c_str(), DH_NV_BLOCK); in delete_hal_non_volatile_store()
[all …]
/system/nfc/src/adaptation/
Dlibmain.c81 char filename[256], filename2[256]; in nfa_nv_co_read() local
83 memset(filename, 0, sizeof(filename)); in nfa_nv_co_read()
91 sprintf(filename, "%s%u", filename2, block); in nfa_nv_co_read()
93 ALOGD("%s: buffer len=%u; file=%s", __func__, nbytes, filename); in nfa_nv_co_read()
94 int fileStream = open(filename, O_RDONLY); in nfa_nv_co_read()
134 char filename[256], filename2[256]; in nfa_nv_co_write() local
136 memset(filename, 0, sizeof(filename)); in nfa_nv_co_write()
144 sprintf(filename, "%s%u", filename2, block); in nfa_nv_co_write()
145 ALOGD("%s: bytes=%u; file=%s", __func__, nbytes, filename); in nfa_nv_co_write()
149 fileStream = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); in nfa_nv_co_write()
[all …]
/system/vold/
DLoop.cpp51 char filename[256]; in dumpState() local
57 snprintf(filename, sizeof(filename), "/dev/block/loop%d", i); in dumpState()
59 if ((fd = open(filename, O_RDWR | O_CLOEXEC)) < 0) { in dumpState()
61 SLOGE("Unable to open %s (%s)", filename, strerror(errno)); in dumpState()
75 SLOGE("Unable to get loop status for %s (%s)", filename, in dumpState()
80 asprintf(&tmp, "%s %d %lld:%lld %llu %lld:%lld %lld 0x%x {%s} {%s}", filename, li.lo_number, in dumpState()
93 char filename[256]; in lookupActive() local
101 snprintf(filename, sizeof(filename), "/dev/block/loop%d", i); in lookupActive()
103 if ((fd = open(filename, O_RDWR | O_CLOEXEC)) < 0) { in lookupActive()
105 SLOGE("Unable to open %s (%s)", filename, strerror(errno)); in lookupActive()
[all …]
/system/extras/ioshark/
Dcompile_ioshark_subr.c34 static int filename_cache_lookup(char *filename);;
59 free(s->filename); in files_db_write_objects()
74 if (strcmp(db_node->filename, pathname) == 0) in files_db_lookup()
81 void *files_db_add(char *filename) in files_db_add() argument
86 if ((db_node = files_db_lookup(filename))) in files_db_add()
88 hash = jenkins_one_at_a_time_hash(filename, strlen(filename)); in files_db_add()
91 db_node->filename = strdup(filename); in files_db_add()
93 filename_cache_lookup(filename); in files_db_add()
162 filename_cache_lookup(char *filename) in filename_cache_lookup() argument
168 if (strcmp(filename_cache[i].path, filename) == 0) in filename_cache_lookup()
[all …]
/system/update_engine/common/
Dprefs.cc119 base::FilePath filename; in GetKey() local
120 TEST_AND_RETURN_FALSE(GetFileNameForKey(key, &filename)); in GetKey()
121 if (!base::ReadFileToString(filename, value)) { in GetKey()
129 base::FilePath filename; in SetKey() local
130 TEST_AND_RETURN_FALSE(GetFileNameForKey(key, &filename)); in SetKey()
131 if (!base::DirectoryExists(filename.DirName())) { in SetKey()
134 TEST_AND_RETURN_FALSE(base::CreateDirectory(filename.DirName())); in SetKey()
136 TEST_AND_RETURN_FALSE(base::WriteFile(filename, value.data(), value.size()) == in SetKey()
142 base::FilePath filename; in KeyExists() local
143 TEST_AND_RETURN_FALSE(GetFileNameForKey(key, &filename)); in KeyExists()
[all …]
/system/extras/tests/sdcard/
Dsysutil.cpp65 void printErrno(const char *msg, const char *filename) in printErrno() argument
67 fprintf(stderr, "# %s %s %d %s\n", msg, filename, errno, strerror(errno)); in printErrno()
77 int readStringFromFile(const char *filename, char *const start, size_t size, bool must_exist=true) in readStringFromFile() argument
84 int fd = open(filename, O_RDONLY); in readStringFromFile()
90 printErrno("Failed to open", filename); in readStringFromFile()
112 printErrno("Failed to read", filename); in readStringFromFile()
138 fprintf(stderr, "Buffer too small for %s\n", filename); in readStringFromFile()
146 int writeStringToFile(const char *filename, const char *start, bool must_exist=true) in writeStringToFile() argument
148 int fd = open(filename, O_WRONLY); in writeStringToFile()
155 printErrno("Failed to open", filename); in writeStringToFile()
[all …]
/system/timezone/
Ddownload-iana-data.py33 def FtpRetrieveFile(ftp, filename): argument
34 ftp.retrbinary('RETR %s' % filename, open(filename, 'wb').write)
63 for filename in ftp.nlst():
64 if "/" in filename:
68 if filename.startswith('tzdata20') and filename.endswith('.tar.gz'):
69 iana_tar_filenames.append(filename)
Dtzdatautil.py22 for filename in os.listdir(dir_name):
23 if filename.startswith('tzdata20') and filename.endswith('.tar.gz'):
24 matching_files.append(filename);
/system/extras/simpleperf/
Dread_elf.h42 ElfStatus GetBuildIdFromNoteFile(const std::string& filename, BuildId* build_id);
43 ElfStatus GetBuildIdFromElfFile(const std::string& filename, BuildId* build_id);
44 ElfStatus GetBuildIdFromEmbeddedElfFile(const std::string& filename, uint64_t file_offset,
62 ElfStatus ParseSymbolsFromElfFile(const std::string& filename,
65 ElfStatus ParseSymbolsFromEmbeddedElfFile(const std::string& filename, uint64_t file_offset,
69 ElfStatus ReadMinExecutableVirtualAddressFromElfFile(const std::string& filename,
73 ElfStatus ReadSectionFromElfFile(const std::string& filename, const std::string& section_name,
79 ElfStatus IsValidElfPath(const std::string& filename);
Dthread_tree.cpp103 uint64_t time, const std::string& filename) { in AddKernelMap() argument
108 Dso* dso = FindKernelDsoOrNew(filename); in AddKernelMap()
116 Dso* ThreadTree::FindKernelDsoOrNew(const std::string& filename) { in FindKernelDsoOrNew() argument
117 if (filename == DEFAULT_KERNEL_MMAP_NAME || in FindKernelDsoOrNew()
118 filename == DEFAULT_KERNEL_MMAP_NAME_PERF) { in FindKernelDsoOrNew()
121 auto it = module_dso_tree_.find(filename); in FindKernelDsoOrNew()
123 module_dso_tree_[filename] = Dso::CreateDso(DSO_KERNEL_MODULE, filename); in FindKernelDsoOrNew()
124 it = module_dso_tree_.find(filename); in FindKernelDsoOrNew()
131 const std::string& filename) { in AddThreadMap() argument
133 Dso* dso = FindUserDsoOrNew(filename, start_addr); in AddThreadMap()
[all …]
Dread_elf.cpp88 ElfStatus IsValidElfPath(const std::string& filename) { in IsValidElfPath() argument
89 if (!IsRegularFile(filename)) { in IsValidElfPath()
93 FILE* fp = fopen(filename.c_str(), mode.c_str()); in IsValidElfPath()
132 ElfStatus GetBuildIdFromNoteFile(const std::string& filename, BuildId* build_id) { in GetBuildIdFromNoteFile() argument
134 if (!android::base::ReadFileToString(filename, &content)) { in GetBuildIdFromNoteFile()
177 static ElfStatus OpenObjectFile(const std::string& filename, uint64_t file_offset, in OpenObjectFile() argument
179 FileHelper fhelper = FileHelper::OpenReadOnly(filename); in OpenObjectFile()
184 file_size = GetFileSize(filename); in OpenObjectFile()
189 …auto buffer_or_err = llvm::MemoryBuffer::getOpenFileSlice(fhelper.fd(), filename, file_size, file_… in OpenObjectFile()
221 ElfStatus GetBuildIdFromElfFile(const std::string& filename, BuildId* build_id) { in GetBuildIdFromElfFile() argument
[all …]
/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/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, NULL, in fromContents()
/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/core/libcutils/
Dsched_policy.cpp142 const char* filename; in __initialize() local
147 filename = "/dev/cpuset/foreground/tasks"; in __initialize()
148 fg_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); in __initialize()
149 filename = "/dev/cpuset/background/tasks"; in __initialize()
150 bg_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); in __initialize()
151 filename = "/dev/cpuset/system-background/tasks"; in __initialize()
152 system_bg_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); in __initialize()
153 filename = "/dev/cpuset/top-app/tasks"; in __initialize()
154 ta_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); in __initialize()
157 filename = "/dev/stune/top-app/tasks"; in __initialize()
[all …]
/system/extras/f2fs_utils/
Dmake_f2fs_main.c45 const char *filename = NULL; in main() local
67 filename = argv[optind++]; in main()
75 if (strcmp(filename, "-")) { in main()
76 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644); in main()
88 if (exitcode && strcmp(filename, "-")) in main()
89 unlink(filename); in main()
/system/core/gatekeeperd/
Dgatekeeperd.cpp72 char filename[21]; in store_sid() local
73 snprintf(filename, sizeof(filename), "%u", uid); in store_sid()
74 int fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR); in store_sid()
76 ALOGE("could not open file: %s: %s", filename, strerror(errno)); in store_sid()
99 const char *filename = ".coldboot"; in mark_cold_boot() local
100 if (access(filename, F_OK) == -1) { in mark_cold_boot()
101 int fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR); in mark_cold_boot()
103 ALOGE("could not open file: %s : %s", filename, strerror(errno)); in mark_cold_boot()
113 char filename[21]; in maybe_store_sid() local
114 snprintf(filename, sizeof(filename), "%u", uid); in maybe_store_sid()
[all …]
/system/extras/perfprofd/quipper/
Dperf_utils.cc123 offset = sizeof(event.mmap) - sizeof(event.mmap.filename) + in GetPerfSampleDataOffset()
124 GetUint64AlignedStringLength(event.mmap.filename); in GetPerfSampleDataOffset()
141 offset = sizeof(event.mmap2) - sizeof(event.mmap2.filename) + in GetPerfSampleDataOffset()
142 GetUint64AlignedStringLength(event.mmap2.filename); in GetPerfSampleDataOffset()
157 bool ReadFileToData(const string& filename, std::vector<char>* data) { in ReadFileToData() argument
158 std::ifstream in(filename.c_str(), std::ios::binary); in ReadFileToData()
160 LOG(ERROR) << "Failed to open file " << filename; in ReadFileToData()
171 LOG(ERROR) << "Error reading from file " << filename; in ReadFileToData()
177 bool WriteDataToFile(const std::vector<char>& data, const string& filename) { in WriteDataToFile() argument
178 std::ofstream out(filename.c_str(), std::ios::binary); in WriteDataToFile()
Dperf_utils.h39 bool FileToBuffer(const string& filename, std::vector<char>* contents);
42 bool BufferToFile(const string& filename, const CharContainer& contents) { in BufferToFile() argument
43 FILE* fp = fopen(filename.c_str(), "wb"); in BufferToFile()
93 bool FileExists(const string& filename);
97 bool ReadFileToData(const string& filename, std::vector<char>* data);
101 bool WriteDataToFile(const std::vector<char>& data, const string& filename);
/system/tools/hidl/
DLocation.h30 inline const std::string &filename() const { return mFilename; } in filename() function
44 if (!pos.filename().empty()) {
45 ostr << pos.filename() << ":";
68 Position last = Position(loc.end().filename(),
72 if (loc.begin().filename() != last.filename()) {
/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/security/keystore/
Dkeystore.cpp191 android::String8 filename(aliases[i]); in resetUser() local
192 filename = android::String8::format("%s/%s", userState->getUserDirName(), in resetUser()
193 getKeyName(filename, TYPE_ANY).string()); in resetUser()
197 ResponseCode rc = get(filename, &blob, ::TYPE_ANY, userId); in resetUser()
223 del(filename, ::TYPE_ANY, userId); in resetUser()
280 ResponseCode KeyStore::get(const char* filename, Blob* keyBlob, const BlobType type, uid_t userId) { in get() argument
283 keyBlob->readBlob(filename, userState->getEncryptionKey(), userState->getState()); in get()
294 if (upgradeBlob(filename, keyBlob, version, type, userId)) { in get()
295 if ((rc = this->put(filename, keyBlob, userId)) != ResponseCode::NO_ERROR || in get()
296 (rc = keyBlob->readBlob(filename, userState->getEncryptionKey(), in get()
[all …]
/system/tpm/attestation/client/
Dmain.cc166 base::FilePath filename(command_line->GetSwitchValueASCII("input")); in ScheduleCommand() local
167 if (!base::ReadFileToString(filename, &input)) { in ScheduleCommand()
168 LOG(ERROR) << "Failed to read file: " << filename.value(); in ScheduleCommand()
179 base::FilePath filename(command_line->GetSwitchValueASCII("input")); in ScheduleCommand() local
180 if (!base::ReadFileToString(filename, &input)) { in ScheduleCommand()
181 LOG(ERROR) << "Failed to read file: " << filename.value(); in ScheduleCommand()
192 base::FilePath filename(command_line->GetSwitchValueASCII("input")); in ScheduleCommand() local
193 if (!base::ReadFileToString(filename, &input)) { in ScheduleCommand()
194 LOG(ERROR) << "Failed to read file: " << filename.value(); in ScheduleCommand()
205 base::FilePath filename(command_line->GetSwitchValueASCII("input")); in ScheduleCommand() local
[all …]

123456789