Searched refs:ctx (Results 1 – 8 of 8) sorted by relevance
/bootable/recovery/mtdutils/ |
D | mtdutils.c | 259 MtdReadContext *ctx = (MtdReadContext*) malloc(sizeof(MtdReadContext)); in mtd_read_partition() local 260 if (ctx == NULL) return NULL; in mtd_read_partition() 262 ctx->buffer = malloc(partition->erase_size); in mtd_read_partition() 263 if (ctx->buffer == NULL) { in mtd_read_partition() 264 free(ctx); in mtd_read_partition() 270 ctx->fd = open(mtddevname, O_RDONLY); in mtd_read_partition() 271 if (ctx->fd < 0) { in mtd_read_partition() 272 free(ctx->buffer); in mtd_read_partition() 273 free(ctx); in mtd_read_partition() 277 ctx->partition = partition; in mtd_read_partition() [all …]
|
D | mtdutils.h | 57 off_t mtd_find_write_start(MtdWriteContext *ctx, off_t pos);
|
/bootable/recovery/applypatch/ |
D | applypatch.c | 190 MtdReadContext* ctx = NULL; in LoadPartitionContents() local 207 ctx = mtd_read_partition(mtd); in LoadPartitionContents() 208 if (ctx == NULL) { in LoadPartitionContents() 242 read = mtd_read_data(ctx, p, next); in LoadPartitionContents() 287 mtd_read_close(ctx); in LoadPartitionContents() 396 MtdWriteContext* ctx = mtd_write_partition(mtd); in WriteToPartition() local 397 if (ctx == NULL) { in WriteToPartition() 403 size_t written = mtd_write_data(ctx, (char*)data, len); in WriteToPartition() 407 mtd_write_close(ctx); in WriteToPartition() 411 if (mtd_erase_blocks(ctx, -1) < 0) { in WriteToPartition() [all …]
|
D | applypatch.h | 75 SinkFn sink, void* token, SHA_CTX* ctx); 83 SinkFn sink, void* token, SHA_CTX* ctx,
|
D | imgpatch.c | 40 SinkFn sink, void* token, SHA_CTX* ctx, in ApplyImagePatch() argument 82 patch, patch_offset, sink, token, ctx); in ApplyImagePatch() 97 SHA_update(ctx, patch->data + pos, data_len); in ApplyImagePatch() 219 SHA_update(ctx, temp_data, have); in ApplyImagePatch()
|
D | bspatch.c | 102 SinkFn sink, void* token, SHA_CTX* ctx) { in ApplyBSDiffPatch() argument 115 if (ctx) { in ApplyBSDiffPatch() 116 SHA_update(ctx, new_data, new_size); in ApplyBSDiffPatch()
|
/bootable/recovery/ |
D | verifier.cpp | 142 SHA_CTX ctx; in verify_file() local 143 SHA_init(&ctx); in verify_file() 162 SHA_update(&ctx, buffer, size); in verify_file() 173 const uint8_t* sha1 = SHA_final(&ctx); in verify_file()
|
/bootable/recovery/updater/ |
D | install.c | 241 MtdWriteContext* ctx = mtd_write_partition(mtd); in FormatFn() local 242 if (ctx == NULL) { in FormatFn() 247 if (mtd_erase_blocks(ctx, -1) == -1) { in FormatFn() 248 mtd_write_close(ctx); in FormatFn() 253 if (mtd_write_close(ctx) != 0) { in FormatFn() 720 int data_len, void* ctx) { in write_raw_image_cb() argument 721 int r = mtd_write_data((MtdWriteContext*)ctx, (const char *)data, data_len); in write_raw_image_cb() 760 MtdWriteContext* ctx = mtd_write_partition(mtd); in WriteRawImageFn() local 761 if (ctx == NULL) { in WriteRawImageFn() 785 int wrote = mtd_write_data(ctx, buffer, read); in WriteRawImageFn() [all …]
|