Home | History | Annotate | Download | only in updater

Lines Matching defs:BLOCKSIZE

55 #define BLOCKSIZE 4096
255 rss->tgt.pos[rss->p_block * 2]) * BLOCKSIZE;
257 off64_t offset = static_cast<off64_t>(rss->tgt.pos[rss->p_block*2]) * BLOCKSIZE;
350 if (!check_lseek(fd, (off64_t) src.pos[i * 2] * BLOCKSIZE, SEEK_SET)) {
354 size_t size = (src.pos[i * 2 + 1] - src.pos[i * 2]) * BLOCKSIZE;
371 off64_t offset = static_cast<off64_t>(tgt.pos[i * 2]) * BLOCKSIZE;
372 size_t size = (tgt.pos[i * 2 + 1] - tgt.pos[i * 2]) * BLOCKSIZE;
436 allocate(src.size * BLOCKSIZE, buffer);
448 SHA1(data, blocks * BLOCKSIZE, digest);
567 allocate(src.size * BLOCKSIZE, buffer);
605 if ((sb.st_size % BLOCKSIZE) != 0) {
607 fn.c_str(), static_cast<int64_t>(sb.st_size), BLOCKSIZE);
625 *blocks = sb.st_size / BLOCKSIZE;
642 if (checkspace && CacheSizeCheck(blocks * BLOCKSIZE) != 0) {
676 if (write_all(fd, buffer, blocks * BLOCKSIZE) == -1) {
745 if (CacheSizeCheck(maxblocks * BLOCKSIZE) != 0) {
763 size = maxblocks * BLOCKSIZE - size;
795 allocate(src.size * BLOCKSIZE, buffer);
844 memmove(to + (locs.pos[i*2] * BLOCKSIZE), from + (start * BLOCKSIZE),
845 blocks * BLOCKSIZE);
886 allocate(src_blocks * BLOCKSIZE, buffer);
988 std::vector<uint8_t> tgtbuffer(tgt.size * BLOCKSIZE);
1127 allocate(BLOCKSIZE, params.buffer);
1128 memset(params.buffer.data(), 0, BLOCKSIZE);
1132 off64_t offset = static_cast<off64_t>(tgt.pos[i * 2]) * BLOCKSIZE;
1133 size_t size = (tgt.pos[i * 2 + 1] - tgt.pos[i * 2]) * BLOCKSIZE;
1143 if (write_all(params.fd, params.buffer, BLOCKSIZE) == -1) {
1175 rss.p_remain = (tgt.pos[1] - tgt.pos[0]) * BLOCKSIZE;
1177 off64_t offset = static_cast<off64_t>(tgt.pos[0]) * BLOCKSIZE;
1178 if (!discard_blocks(params.fd, offset, tgt.size * BLOCKSIZE)) {
1258 rss.p_remain = (tgt.pos[1] - tgt.pos[0]) * BLOCKSIZE;
1260 off64_t offset = static_cast<off64_t>(tgt.pos[0]) * BLOCKSIZE;
1270 if (ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
1276 if (ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, &patch_value,
1333 blocks[0] = tgt.pos[i * 2] * (uint64_t) BLOCKSIZE;
1335 blocks[1] = (tgt.pos[i * 2 + 1] - tgt.pos[i * 2]) * (uint64_t) BLOCKSIZE;
1597 params.written * BLOCKSIZE);
1599 params.stashed * BLOCKSIZE);
1756 std::vector<uint8_t> buffer(BLOCKSIZE);
1758 if (!check_lseek(fd, (off64_t)rs.pos[i*2] * BLOCKSIZE, SEEK_SET)) {
1765 if (read_all(fd, buffer, BLOCKSIZE) == -1) {
1771 SHA1_Update(&ctx, buffer.data(), BLOCKSIZE);
1807 std::vector<uint8_t> block0_buffer(BLOCKSIZE);
1881 uint8_t buffer[BLOCKSIZE];
1886 if (status.data_size <= (uint64_t)j * BLOCKSIZE) {
1890 if (fh.pread(buffer, BLOCKSIZE, (off64_t)j * BLOCKSIZE) != BLOCKSIZE) {