Home
last modified time | relevance | path

Searched refs:tgt (Results 1 – 2 of 2) sorted by relevance

/bootable/recovery/updater/
Dblockimg.c171 RangeSet* tgt; member
205 if (rss->p_block < rss->tgt->count) { in RangeSinkWrite()
206 rss->p_remain = (rss->tgt->pos[rss->p_block * 2 + 1] - in RangeSinkWrite()
207 rss->tgt->pos[rss->p_block * 2]) * BLOCKSIZE; in RangeSinkWrite()
209 if (!check_lseek(rss->fd, (off64_t)rss->tgt->pos[rss->p_block*2] * BLOCKSIZE, in RangeSinkWrite()
273 if (nti->rss->p_block == nti->rss->tgt->count) { in receive_new_data()
318 static int WriteBlocks(RangeSet* tgt, uint8_t* buffer, int fd) { in WriteBlocks() argument
323 if (!tgt || !buffer) { in WriteBlocks()
327 for (i = 0; i < tgt->count; ++i) { in WriteBlocks()
328 if (!check_lseek(fd, (off64_t) tgt->pos[i * 2] * BLOCKSIZE, SEEK_SET)) { in WriteBlocks()
[all …]
/bootable/recovery/applypatch/
Dimgdiff.c616 unsigned char* MakePatch(ImageChunk* src, ImageChunk* tgt, size_t* size) { in MakePatch() argument
617 if (tgt->type == CHUNK_NORMAL) { in MakePatch()
618 if (tgt->len <= 160) { in MakePatch()
619 tgt->type = CHUNK_RAW; in MakePatch()
620 *size = tgt->len; in MakePatch()
621 return tgt->data; in MakePatch()
628 int r = bsdiff(src->data, src->len, &(src->I), tgt->data, tgt->len, ptemp); in MakePatch()
643 if (tgt->type == CHUNK_NORMAL && tgt->len <= st.st_size) { in MakePatch()
646 tgt->type = CHUNK_RAW; in MakePatch()
647 *size = tgt->len; in MakePatch()
[all …]