Home
last modified time | relevance | path

Searched refs:len (Results 1 – 17 of 17) sorted by relevance

/bootable/recovery/applypatch/
Dbsdiff.c60 static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h) in split() argument
64 if(len<16) { in split()
65 for(k=start;k<start+len;k+=j) { in split()
67 for(i=1;k+i<start+len;i++) { in split()
83 x=V[I[start+len/2]+h]; in split()
85 for(i=start;i<start+len;i++) { in split()
118 if(start+len>kk) split(I,V,kk,start+len-kk,h); in split()
124 off_t i,h,len; in qsufsort() local
140 len=0; in qsufsort()
143 len-=I[i]; in qsufsort()
[all …]
Dimgdiff.c140 size_t len; member
293 curr->len = st.st_size; in ReadZip()
313 curr->len = temp_entries[nextentry].uncomp_len; in ReadZip()
314 curr->data = malloc(curr->len); in ReadZip()
327 strm.avail_out = curr->len; in ReadZip()
350 curr->len = temp_entries[nextentry].data_offset - pos; in ReadZip()
352 curr->len = st.st_size - pos; in ReadZip()
357 pos += curr->len; in ReadZip()
420 curr->len = GZIP_HEADER_LEN; in ReadImage()
424 pos += curr->len; in ReadImage()
[all …]
Dapplypatch.c35 static ssize_t FileSink(const unsigned char* data, ssize_t len, void* token);
351 int WriteToPartition(unsigned char* data, size_t len, in WriteToPartition() argument
393 size_t written = mtd_write_data(ctx, (char*)data, len); in WriteToPartition()
394 if (written != len) { in WriteToPartition()
396 written, len, partition); in WriteToPartition()
430 while (start < len) { in WriteToPartition()
431 size_t to_write = len - start; in WriteToPartition()
477 start = len; in WriteToPartition()
479 for (p = 0; p < len; p += sizeof(buffer)) { in WriteToPartition()
480 size_t to_read = len - p; in WriteToPartition()
[all …]
/bootable/recovery/mtdutils/
Dflash_image.c106 int len; in main() local
107 while ((len = TEMP_FAILURE_RETRY(read(fd, buf, sizeof(buf)))) > 0) { in main()
108 wrote = mtd_write_data(out, buf, len); in main()
109 if (wrote != len) die("error writing %s", argv[1]); in main()
111 if (len < 0) die("error reading %s", argv[2]); in main()
134 len = TEMP_FAILURE_RETRY(read(fd, buf, left > (int)sizeof(buf) ? (int)sizeof(buf) : left)); in main()
135 if (len <= 0) die("error reading %s", argv[2]); in main()
136 if (mtd_write_data(out, buf, len) != len) in main()
138 left -= len; in main()
Dmtdutils.c328 ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) in mtd_read_data() argument
331 while (read < len) { in mtd_read_data()
334 size_t copy = len - read < avail ? len - read : avail; in mtd_read_data()
342 len - read >= ctx->partition->erase_size) { in mtd_read_data()
347 if (read >= len) { in mtd_read_data()
352 if (ctx->consumed == ctx->partition->erase_size && read < len) { in mtd_read_data()
478 ssize_t mtd_write_data(MtdWriteContext *ctx, const char *data, size_t len) in mtd_write_data() argument
481 while (wrote < len) { in mtd_write_data()
483 if (ctx->stored > 0 || len - wrote < ctx->partition->erase_size) { in mtd_write_data()
485 size_t copy = len - wrote < avail ? len - wrote : avail; in mtd_write_data()
[all …]
/bootable/recovery/
Dinterlace-frames.py29 assert len(frames) > 0, "Must have at least one input frame."
34 assert len(sizes) == 1, "All input images must have the same size."
36 N = len(frames)
Dfuse_sideload.c97 static void fuse_reply(struct fuse_data* fd, __u64 unique, const void *data, size_t len) in fuse_reply() argument
103 hdr.len = len + sizeof(hdr); in fuse_reply()
110 vec[1].iov_len = len; in fuse_reply()
317 outhdr.len = sizeof(outhdr) + size; in handle_read()
445 ssize_t len = TEMP_FAILURE_RETRY(read(fd.ffd, request_buffer, sizeof(request_buffer))); in run_fuse_sideload() local
446 if (len == -1) { in run_fuse_sideload()
455 if ((size_t)len < sizeof(struct fuse_in_header)) { in run_fuse_sideload()
456 fprintf(stderr, "request too short: len=%zu\n", (size_t)len); in run_fuse_sideload()
506 outhdr.len = sizeof(outhdr); in run_fuse_sideload()
Dverifier.cpp390 &(key->len), &(key->n0inv), &(key->n[0])) != 3) { in load_keys()
393 if (key->len != RSANUMWORDS) { in load_keys()
394 LOGE("key length (%d) does not match expected size\n", key->len); in load_keys()
397 for (i = 1; i < key->len; ++i) { in load_keys()
401 for (i = 1; i < key->len; ++i) { in load_keys()
Drecovery.cpp1012 int len = strlen(update_package) + 10; in main() local
1013 char* modified_path = (char*)malloc(len); in main()
1014 strlcpy(modified_path, "/cache/", len); in main()
1015 strlcat(modified_path, update_package+6, len); in main()
/bootable/recovery/tools/ota/
Dcheck-lost+found.c121 int len = klogctl(KLOG_READ_ALL, dmesg, sizeof(dmesg) - 1); in main() local
122 if (len < 0) { in main()
126 dmesg[len] = '\0'; in main()
/bootable/recovery/uncrypt/
Duncrypt.cpp142 int len = strlen(v->mount_point); in find_block_device() local
143 if (strncmp(path, v->mount_point, len) == 0 && in find_block_device()
144 (path[len] == '/' || path[len] == 0)) { in find_block_device()
/bootable/recovery/updater/
Dblockimg.c404 int len; in GetStashFileName() local
419 len = strlen(STASH_DIRECTORY_BASE) + 1 + strlen(base) + 1 + strlen(id) + strlen(postfix) + 1; in GetStashFileName()
420 fn = malloc(len); in GetStashFileName()
423 fprintf(stderr, "failed to malloc %d bytes for fn\n", len); in GetStashFileName()
427 res = snprintf(fn, len, STASH_DIRECTORY_BASE "/%s/%s%s", base, id, postfix); in GetStashFileName()
429 if (res < 0 || res >= len) { in GetStashFileName()
448 int len; in EnumerateStash() local
470 len = strlen(dirname) + 1 + strlen(item->d_name) + 1; in EnumerateStash()
471 fn = malloc(len); in EnumerateStash()
474 fprintf(stderr, "failed to malloc %d bytes for fn\n", len); in EnumerateStash()
[all …]
Dinstall.c1522 size_t len = strtoull(len_str, NULL, 0); in WipeBlockDeviceFn() local
1524 int success = wipe_block_device(fd, len); in WipeBlockDeviceFn()
/bootable/recovery/minzip/
DZip.h62 size_t len; member
DZip.c712 long len; member
721 bec->len -= dataLen; in bufferProcessFunction()
735 bec.len = mzGetZipEntryUncompLen(pEntry); in mzExtractZipEntryToBuffer()
739 if (!ret || bec.len != 0) { in mzExtractZipEntryToBuffer()
/bootable/recovery/edify/
Dexpr.c151 int len = argv[i]->end - argv[i]->start; in AssertFn() local
152 char* err_src = malloc(len + 20); in AssertFn()
155 memcpy(err_src + prefix_len, state->script + argv[i]->start, len); in AssertFn()
156 err_src[prefix_len + len] = '\0'; in AssertFn()
/bootable/recovery/minui/
Dresources.cpp419 int len = row[4]; in res_create_localized_alpha_surface() local