diff options
Diffstat (limited to 'bootloader.cpp')
-rw-r--r-- | bootloader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bootloader.cpp b/bootloader.cpp index dec296f..9e91b27 100644 --- a/bootloader.cpp +++ b/bootloader.cpp @@ -168,6 +168,9 @@ static int get_bootloader_message_block(struct bootloader_message *out, LOGE("Can't open %s\n(%s)\n", v->blk_device, strerror(errno)); return -1; } +#ifdef BOARD_RECOVERY_BLDRMSG_OFFSET + fseek(f, BOARD_RECOVERY_BLDRMSG_OFFSET, SEEK_SET); +#endif struct bootloader_message temp; int count = fread(&temp, sizeof(temp), 1, f); if (count != 1) { @@ -190,6 +193,9 @@ static int set_bootloader_message_block(const struct bootloader_message *in, LOGE("Can't open %s\n(%s)\n", v->blk_device, strerror(errno)); return -1; } +#ifdef BOARD_RECOVERY_BLDRMSG_OFFSET + fseek(f, BOARD_RECOVERY_BLDRMSG_OFFSET, SEEK_SET); +#endif int count = fwrite(in, sizeof(*in), 1, f); if (count != 1) { LOGE("Failed writing %s\n(%s)\n", v->blk_device, strerror(errno)); |