Lines Matching refs:filename
53 static int OpenAndReadMagic(const char* filename, uint32_t* magic, std::string* error_msg) { in OpenAndReadMagic() argument
55 ScopedFd fd(open(filename, O_RDONLY, 0)); in OpenAndReadMagic()
57 *error_msg = StringPrintf("Unable to open '%s' : %s", filename, strerror(errno)); in OpenAndReadMagic()
62 *error_msg = StringPrintf("Failed to find magic in '%s'", filename); in OpenAndReadMagic()
66 *error_msg = StringPrintf("Failed to seek to beginning of file '%s' : %s", filename, in OpenAndReadMagic()
73 bool DexFile::GetChecksum(const char* filename, uint32_t* checksum, std::string* error_msg) { in GetChecksum() argument
79 const char* file_part = filename; in GetChecksum()
82 if (DexFile::IsMultiDexLocation(filename)) { in GetChecksum()
83 file_part_storage = GetBaseLocation(filename); in GetChecksum()
85 zip_entry_name = filename + file_part_storage.size() + 1; in GetChecksum()
95 …std::unique_ptr<ZipArchive> zip_archive(ZipArchive::OpenFromFd(fd.release(), filename, error_msg)); in GetChecksum()
110 …std::unique_ptr<const DexFile> dex_file(DexFile::OpenFile(fd.release(), filename, false, error_msg… in GetChecksum()
117 *error_msg = StringPrintf("Expected valid zip or dex file: '%s'", filename); in GetChecksum()
121 bool DexFile::Open(const char* filename, const char* location, std::string* error_msg, in Open() argument
124 ScopedFd fd(OpenAndReadMagic(filename, &magic, error_msg)); in Open()
142 *error_msg = StringPrintf("Expected valid zip or dex file: '%s'", filename); in Open()