Lines Matching refs:offset
91 size_t offset, std::string* err) { in read_misc_partition() argument
101 if (lseek(fd, static_cast<off_t>(offset), SEEK_SET) != static_cast<off_t>(offset)) { in read_misc_partition()
115 size_t offset, std::string* err) { in write_misc_partition() argument
122 if (lseek(fd, static_cast<off_t>(offset), SEEK_SET) != static_cast<off_t>(offset)) { in write_misc_partition()
264 static bool ValidateSystemSpaceRegion(size_t offset, size_t size, std::string* err) { in ValidateSystemSpaceRegion() argument
265 if (size <= SYSTEM_SPACE_SIZE_IN_MISC && offset <= (SYSTEM_SPACE_SIZE_IN_MISC - size)) { in ValidateSystemSpaceRegion()
268 *err = android::base::StringPrintf("Out of bound access (offset %zu size %zu)", offset, size); in ValidateSystemSpaceRegion()
272 static bool ReadMiscPartitionSystemSpace(void* data, size_t size, size_t offset, std::string* err) { in ReadMiscPartitionSystemSpace() argument
273 if (!ValidateSystemSpaceRegion(offset, size, err)) { in ReadMiscPartitionSystemSpace()
280 return read_misc_partition(data, size, misc_blk_device, SYSTEM_SPACE_OFFSET_IN_MISC + offset, in ReadMiscPartitionSystemSpace()
284 static bool WriteMiscPartitionSystemSpace(const void* data, size_t size, size_t offset, in WriteMiscPartitionSystemSpace() argument
286 if (!ValidateSystemSpaceRegion(offset, size, err)) { in WriteMiscPartitionSystemSpace()
293 return write_misc_partition(data, size, misc_blk_device, SYSTEM_SPACE_OFFSET_IN_MISC + offset, in WriteMiscPartitionSystemSpace()