Lines Matching refs:ctrl
97 long ctrl[3] = {0}; in ota_nbpatch() local
196 ctrl[i] = offtin(buf); in ota_nbpatch()
201 if (new_pos + ctrl[0] > new_size){ in ota_nbpatch()
206 read_len = xz_read(&diffhandler, &db, diff_dec, patch, new_buf + new_pos, ctrl[0]); in ota_nbpatch()
207 if ((read_len < ctrl[0])){ in ota_nbpatch()
211 if(old_pos > old_size || old_pos + ctrl[0] > old_size) { in ota_nbpatch()
215 long cp_size = ctrl[0]; in ota_nbpatch()
219 for (i = 0; i < ctrl[0]; i++) { in ota_nbpatch()
236 crc16_update(&crc_ctx, new_buf + new_pos, ctrl[0]); in ota_nbpatch()
238 new_pos += ctrl[0]; in ota_nbpatch()
239 old_pos += ctrl[0]; in ota_nbpatch()
241 if (new_pos + ctrl[1] > new_size) { in ota_nbpatch()
246 read_len = xz_read(&extrahandler, &eb, extra_dec, patch, new_buf + new_pos, ctrl[1]); in ota_nbpatch()
247 if (read_len < ctrl[1]) { in ota_nbpatch()
251 crc16_update(&crc_ctx, new_buf + new_pos, ctrl[1]); in ota_nbpatch()
253 new_pos += ctrl[1]; in ota_nbpatch()
254 old_pos += ctrl[2]; in ota_nbpatch()