BOOTCFG_MAX_SIZE
if (sector_length > BOOTCFG_MAX_SIZE)
sector_length = BOOTCFG_MAX_SIZE;
if (sector_length > BOOTCFG_MAX_SIZE)
sector_length = BOOTCFG_MAX_SIZE;
if (used_bytes > MIN(sector_length, BOOTCFG_MAX_SIZE)) {