Lines Matching refs:idx
117 bs->idx = (found_idx / BOOT_STATUS_STATE_COUNT) + 1; in swap_read_status_bytes()
131 return (bs->idx - BOOT_STATUS_IDX_0) * idx_sz + in boot_status_internal_off()
546 boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, in boot_swap_sectors() argument
564 img_off = boot_img_sector_off(state, BOOT_PRIMARY_SLOT, idx); in boot_swap_sectors()
599 bs->use_scratch = (bs->idx == BOOT_STATUS_IDX_0 && copy_sz != sz); in boot_swap_sectors()
619 if (bs->idx == BOOT_STATUS_IDX_0) { in boot_swap_sectors()
662 if (bs->idx == BOOT_STATUS_IDX_0 && !bs->use_scratch) { in boot_swap_sectors()
732 bs->idx++; in boot_swap_sectors()
763 if (swap_idx >= (bs->idx - BOOT_STATUS_IDX_0)) { in swap_run()
933 if (bs->idx - BOOT_STATUS_IDX_0 >= swap_count) { in boot_read_image_header()
936 } else if (bs->idx - BOOT_STATUS_IDX_0 == swap_count - 1) { in boot_read_image_header()