• Home
  • Raw
  • Download

Lines Matching refs:size

85 static bool read_misc_partition(void* p, size_t size, const std::string& misc_blk_device,  in read_misc_partition()  argument
101 if (!android::base::ReadFully(fd, p, size)) { in read_misc_partition()
109 static bool write_misc_partition(const void* p, size_t size, const std::string& misc_blk_device, in write_misc_partition() argument
122 if (!android::base::WriteFully(fd, p, size)) { in write_misc_partition()
223 bool read_wipe_package(std::string* package_data, size_t size, std::string* err) { in read_wipe_package() argument
228 package_data->resize(size); in read_wipe_package()
229 return read_misc_partition(&(*package_data)[0], size, misc_blk_device, in read_wipe_package()
238 return write_misc_partition(package_data.data(), package_data.size(), misc_blk_device, in write_wipe_package()
242 static bool OffsetAndSizeInVendorSpace(size_t offset, size_t size) { in OffsetAndSizeInVendorSpace() argument
244 return size <= total_size && offset <= total_size - size; in OffsetAndSizeInVendorSpace()
247 bool ReadMiscPartitionVendorSpace(void* data, size_t size, size_t offset, std::string* err) { in ReadMiscPartitionVendorSpace() argument
248 if (!OffsetAndSizeInVendorSpace(offset, size)) { in ReadMiscPartitionVendorSpace()
249 *err = android::base::StringPrintf("Out of bound read (offset %zu size %zu)", offset, size); in ReadMiscPartitionVendorSpace()
256 return read_misc_partition(data, size, misc_blk_device, VENDOR_SPACE_OFFSET_IN_MISC + offset, in ReadMiscPartitionVendorSpace()
260 bool WriteMiscPartitionVendorSpace(const void* data, size_t size, size_t offset, std::string* err) { in WriteMiscPartitionVendorSpace() argument
261 if (!OffsetAndSizeInVendorSpace(offset, size)) { in WriteMiscPartitionVendorSpace()
262 *err = android::base::StringPrintf("Out of bound write (offset %zu size %zu)", offset, size); in WriteMiscPartitionVendorSpace()
269 return write_misc_partition(data, size, misc_blk_device, VENDOR_SPACE_OFFSET_IN_MISC + offset, in WriteMiscPartitionVendorSpace()