Fix bootloader_message.

Bug: 29945717
Change-Id: I934fd6c52b0111937fa75455de2fa4157fb30f6f
This commit is contained in:
Yabin Cui 2016-07-06 11:47:23 -07:00
parent ccb0ba908a
commit 9da04d595f

View file

@ -89,7 +89,7 @@ static bool read_misc_partition(void* p, size_t size, size_t offset, std::string
if (!wait_for_device(misc_blk_device, err)) {
return false;
}
android::base::unique_fd fd(open(misc_blk_device.c_str(), O_WRONLY | O_SYNC));
android::base::unique_fd fd(open(misc_blk_device.c_str(), O_RDONLY));
if (fd.get() == -1) {
*err = android::base::StringPrintf("failed to open %s: %s", misc_blk_device.c_str(),
strerror(errno));