diff options
author | Matt Mower <mowerm@gmail.com> | 2014-07-09 18:50:05 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit> | 2014-07-16 16:09:42 +0200 |
commit | 2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf (patch) | |
tree | 9d54d148e53b04d8417e5f5f15642ef5ff40e450 /bootloader.cpp | |
parent | Remove unused twbootloader.cpp (diff) | |
download | android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.tar android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.tar.gz android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.tar.bz2 android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.tar.lz android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.tar.xz android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.tar.zst android_bootable_recovery-2fec60a5dcc5e83818d68b3266ebfb0198f6dfbf.zip |
Diffstat (limited to 'bootloader.cpp')
-rw-r--r-- | bootloader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootloader.cpp b/bootloader.cpp index fbb31e060..033591274 100644 --- a/bootloader.cpp +++ b/bootloader.cpp @@ -275,7 +275,7 @@ static int get_bootloader_message_block(struct bootloader_message *out, static int set_bootloader_message_block(const struct bootloader_message *in, const Volume* v) { wait_for_device(v->blk_device); - FILE* f = fopen(v->blk_device, "wb"); + FILE* f = fopen(v->blk_device, "rb+"); if (f == NULL) { LOGE("Can't open %s\n(%s)\n", v->blk_device, strerror(errno)); return -1; @@ -317,7 +317,7 @@ int get_bootloader_message_block_name(struct bootloader_message *out) { int set_bootloader_message_block_name(const struct bootloader_message *in, const char* block_name) { wait_for_device(block_name); - FILE* f = fopen(block_name, "wb"); + FILE* f = fopen(block_name, "rb+"); if (f == NULL) { printf("Can't open %s\n(%s)\n", block_name, strerror(errno)); return -1; |