diff options
author | Rob Austein <sra@hactrn.net> | 2016-09-27 12:55:42 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-09-27 12:55:42 -0400 |
commit | 5e127578f0c68ee9baa67d867d75c6a714bd1176 (patch) | |
tree | 404541d5ed9638f149519a9b5d77d40358318f65 /ks_flash.c | |
parent | 84aaee3b36c11950e194c0918afc04331253abe0 (diff) |
Add hal_ks_index_replace().
Diffstat (limited to 'ks_flash.c')
-rw-r--r-- | ks_flash.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1012,16 +1012,11 @@ static hal_error_t update_pin_block(const unsigned b1, * the all-zeros UUID). Maybe later. */ - if ((err = hal_ks_index_delete(&db.ksi, &pin_uuid, &b2)) != HAL_OK) + if ((err = hal_ks_index_replace(&db.ksi, &pin_uuid, &b2)) != HAL_OK) return err; - if (b2 != b1) - return HAL_ERROR_IMPOSSIBLE; - block->pin = *new_data; - err = hal_ks_index_add(&db.ksi, &pin_uuid, &b2); - if (err == HAL_OK) cache_mark_used(block, b2); |