mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
bump storage version
This commit is contained in:
parent
f344ec9c9b
commit
40e174ac87
@ -62,18 +62,21 @@ static char sessionPassphrase[51];
|
|||||||
0x0010 | ? | Storage structure
|
0x0010 | ? | Storage structure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STORAGE_VERSION 3
|
#define STORAGE_VERSION 4
|
||||||
|
|
||||||
void storage_from_flash(uint32_t version)
|
void storage_from_flash(uint32_t version)
|
||||||
{
|
{
|
||||||
switch (version) {
|
switch (version) {
|
||||||
case 1: // copy
|
case 1: // copy (since 1.0.0)
|
||||||
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
||||||
break;
|
break;
|
||||||
case 2: // copy
|
case 2: // copy (since 1.2.1)
|
||||||
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
||||||
break;
|
break;
|
||||||
case 3: // copy
|
case 3: // copy (since 1.3.1)
|
||||||
|
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
||||||
|
break;
|
||||||
|
case 4: // copy (since 1.3.2)
|
||||||
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
memcpy(&storage, (void *)(FLASH_STORAGE_START + 4 + sizeof(storage_uuid)), sizeof(Storage));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 69d476a3ba10c40209dd26789876b265cf03f384
|
Subproject commit 137ae028531567ec2e042ffcd6d6c73a97cfd4c8
|
Loading…
Reference in New Issue
Block a user