1
0
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:
Pavol Rusnak 2015-03-18 13:34:09 +01:00
parent f344ec9c9b
commit 40e174ac87
2 changed files with 8 additions and 5 deletions

View File

@ -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