Home
last modified time | relevance | path

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

/bootable/recovery/tools/ota/
Dconvert-to-bmp.py50 im.size[0] * im.size[1] * 4),
56 im.size[0],
57 im.size[1],
71 for j in range(im.size[1]-1, -1, -1): # rows bottom-to-top
72 for i in range(j*im.size[0]*4, (j+1)*im.size[0]*4, 4):
/bootable/recovery/
Dbootloader.cpp87 const ssize_t size = write_size * MISC_PAGES; in get_bootloader_message_mtd() local
88 char data[size]; in get_bootloader_message_mtd()
89 ssize_t r = mtd_read_data(read, data, size); in get_bootloader_message_mtd()
90 if (r != size) LOGE("Can't read %s\n(%s)\n", v->blk_device, strerror(errno)); in get_bootloader_message_mtd()
92 if (r != size) return -1; in get_bootloader_message_mtd()
113 ssize_t size = write_size * MISC_PAGES; in set_bootloader_message_mtd() local
114 char data[size]; in set_bootloader_message_mtd()
115 ssize_t r = mtd_read_data(read, data, size); in set_bootloader_message_mtd()
116 if (r != size) LOGE("Can't read %s\n(%s)\n", v->blk_device, strerror(errno)); in set_bootloader_message_mtd()
118 if (r != size) return -1; in set_bootloader_message_mtd()
[all …]
Dfuse_sideload.c160 uint64_t nodeid, uint64_t size, uint32_t mode) { in fill_attr() argument
168 attr->size = size; in fill_attr()
169 attr->blocks = (size == 0) ? 0 : (((size-1) / attr->blksize) + 1); in fill_attr()
304 uint32_t size = req->size; in handle_read() local
317 outhdr.len = sizeof(outhdr) + size; in handle_read()
340 if (size + block_offset <= fd->block_size) { in handle_read()
344 vec[1].iov_len = size; in handle_read()
357 vec[2].iov_len = size - vec[1].iov_len; in handle_read()
Dverifier.cpp211 size_t size = signed_len - so_far; in verify_file() local
212 if (size > BUFFER_SIZE) size = BUFFER_SIZE; in verify_file()
214 if (need_sha1) SHA_update(&sha1_ctx, addr + so_far, size); in verify_file()
215 if (need_sha256) SHA256_update(&sha256_ctx, addr + so_far, size); in verify_file()
216 so_far += size; in verify_file()
219 if (f > frac + 0.02 || size == so_far) { in verify_file()
Dinterlace-frames.py32 sizes.add(fr.size)
Dscreen_ui.cpp579 if (offsets.size() <= 1) { in ShowFile()
/bootable/recovery/updater/
Dblockimg.c60 int size; member
76 out->size = 0; in parse_range()
81 out->size += out->pos[i]; in parse_range()
83 out->size -= out->pos[i]; in parse_range()
114 static int read_all(int fd, uint8_t* data, size_t size) { in read_all() argument
116 while (so_far < size) { in read_all()
117 ssize_t r = TEMP_FAILURE_RETRY(read(fd, data+so_far, size-so_far)); in read_all()
127 static int write_all(int fd, const uint8_t* data, size_t size) { in write_all() argument
129 while (written < size) { in write_all()
130 ssize_t w = TEMP_FAILURE_RETRY(write(fd, data+written, size-written)); in write_all()
[all …]
Dinstall.c557 v->size = -1; in PackageExtractFileFn()
569 v->size = mzGetZipEntryUncompLen(entry); in PackageExtractFileFn()
570 v->data = malloc(v->size); in PackageExtractFileFn()
573 name, (long)v->size, zip_path); in PackageExtractFileFn()
585 v->size = -1; in PackageExtractFileFn()
1105 ssize_t wrote = mtd_write_data(ctx, contents->data, contents->size); in WriteRawImageFn()
1106 success = (wrote == contents->size); in WriteRawImageFn()
1257 int size = 0; in UIPrintFn() local
1260 size += strlen(args[i]); in UIPrintFn()
1262 char* buffer = malloc(size+1); in UIPrintFn()
[all …]
/bootable/recovery/applypatch/
Dapplypatch.c67 file->size = file->st.st_size; in LoadFileContents()
68 file->data = malloc(file->size); in LoadFileContents()
78 ssize_t bytes_read = fread(file->data, 1, file->size, f); in LoadFileContents()
79 if (bytes_read != file->size) { in LoadFileContents()
81 filename, (long)bytes_read, (long)file->size); in LoadFileContents()
88 SHA_hash(file->data, file->size, file->sha1); in LoadFileContents()
155 size_t* size = malloc(pairs * sizeof(size_t)); in LoadPartitionContents() local
160 size[i] = strtol(size_str, NULL, 10); in LoadPartitionContents()
161 if (size[i] == 0) { in LoadPartitionContents()
171 size_array = size; in LoadPartitionContents()
[all …]
Dimgpatch.c46 if (patch->size < 12) { in ApplyImagePatch()
64 if (pos + 4 > patch->size) { in ApplyImagePatch()
74 if (pos > patch->size) { in ApplyImagePatch()
88 if (pos > patch->size) { in ApplyImagePatch()
95 if (pos + data_len > patch->size) { in ApplyImagePatch()
110 if (pos > patch->size) { in ApplyImagePatch()
133 size_t bonus_size = (i == 1 && bonus_data != NULL) ? bonus_data->size : 0; in ApplyImagePatch()
Dfreecache.c77 int size = 32; in FindExpendableFiles() local
79 *names = malloc(size * sizeof(char*)); in FindExpendableFiles()
108 if (*entries >= size) { in FindExpendableFiles()
109 size *= 2; in FindExpendableFiles()
110 *names = realloc(*names, size * sizeof(char*)); in FindExpendableFiles()
Dmain.c82 (*patches)[i]->size = fc.size; in ParsePatchArgs()
112 bonus->size = fc.size; in PatchMode()
Dbspatch.c85 int FillBuffer(unsigned char* buffer, int size, bz_stream* stream) { in FillBuffer() argument
87 stream->avail_out = size; in FillBuffer()
177 estream.avail_in = patch->size - (patch_offset + 32 + ctrl_len + data_len); in ApplyBSDiffPatchMem()
Dimgdiff_test.sh60 size() { function
94 /data/local/tmp/target $(sha1 $tmpdir/target) $(size $tmpdir/target) \
Dapplypatch.h32 ssize_t size; member
Dimgdiff.c616 unsigned char* MakePatch(ImageChunk* src, ImageChunk* tgt, size_t* size) { in MakePatch() argument
620 *size = tgt->len; in MakePatch()
647 *size = tgt->len; in MakePatch()
651 *size = st.st_size; in MakePatch()
/bootable/recovery/mtdutils/
Dmtdutils.c33 unsigned int size; member
145 p->size = mtdsize; in mtd_scan_partitions()
251 if (total_size != NULL) *total_size = mtd_info.size; in mtd_partition_info()
296 ssize_t size = partition->erase_size; in read_block() local
299 while (pos + size <= (int) partition->size) { in read_block()
301 TEMP_FAILURE_RETRY(read(fd, data, size)) != size) { in read_block()
417 ssize_t size = partition->erase_size; in write_block() local
418 while (pos + size <= (int) partition->size) { in write_block()
432 erase_info.length = size; in write_block()
441 TEMP_FAILURE_RETRY(write(fd, data, size)) != size) { in write_block()
[all …]
/bootable/recovery/minzip/
DSysUtil.c91 size_t size; in sysMapBlockFile() local
108 if (fscanf(mapf, "%zu %u\n%u\n", &size, &blksize, &range_count) != 3) { in sysMapBlockFile()
113 blocks = ((size-1) / blksize) + 1; in sysMapBlockFile()
156 pMap->length = size; in sysMapBlockFile()
DHash.h85 size_t mzHashSize(size_t size);
DHash.c26 size_t mzHashSize(size_t size) { in mzHashSize() argument
27 return (size * LOAD_DENOM) / LOAD_NUMER +1; in mzHashSize()
/bootable/recovery/uncrypt/
Duncrypt.cpp69 static int write_at_offset(unsigned char* buffer, size_t size, int wfd, off64_t offset) { in write_at_offset() argument
75 while (written < size) { in write_at_offset()
76 ssize_t wrote = TEMP_FAILURE_RETRY(write(wfd, buffer + written, size - written)); in write_at_offset()
338 size_t size = sizeof(zeroes); in wipe_misc() local
339 while (written < size) { in wipe_misc()
340 ssize_t w = TEMP_FAILURE_RETRY(write(fd, zeroes, size-written)); in wipe_misc()
/bootable/recovery/edify/
Dmain.c187 int size = fread(buffer, 1, 8191, f); in main() local
189 buffer[size] = '\0'; in main()
Dexpr.h53 ssize_t size; member
Dexpr.c56 v->size = strlen(str); in StringValue()
/bootable/recovery/minui/
Dresources.cpp40 size_t size = sizeof(GRSurface) + data_size + SURFACE_DATA_ALIGNMENT; in malloc_surface() local
41 unsigned char* temp = reinterpret_cast<unsigned char*>(malloc(size)); in malloc_surface()