summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader_message/bootloader_message.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp
index 449f40e11..4d1ce5bb4 100644
--- a/bootloader_message/bootloader_message.cpp
+++ b/bootloader_message/bootloader_message.cpp
@@ -159,10 +159,7 @@ static bool write_misc_partition(const void* p, size_t size, size_t offset, std:
*err = "no misc device set";
return false;
}
- int open_flags = O_WRONLY | O_SYNC;
- if (offset > 0)
- open_flags = O_RDWR | O_APPEND | O_SYNC;
- int fd = (open(misc_blk_device.c_str(), open_flags));
+ int fd = (open(misc_blk_device.c_str(), O_WRONLY | O_SYNC));
if (fd == -1) {
*err = "failed to open " + misc_blk_device + ": ";
*err += strerror(errno);