mgmt: hawkbit: use flash_img_get_upload_slot()
don't assume, that the slot to upload is the second. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
parent
beffba6d87
commit
ca43888f54
1 changed files with 1 additions and 1 deletions
|
|
@ -859,7 +859,7 @@ int hawkbit_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DBG("Marked current image as OK");
|
LOG_DBG("Marked current image as OK");
|
||||||
ret = boot_erase_img_bank(FIXED_PARTITION_ID(SLOT1_LABEL));
|
ret = boot_erase_img_bank(flash_img_get_upload_slot());
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
LOG_ERR("Failed to erase second slot: %d", ret);
|
LOG_ERR("Failed to erase second slot: %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue