summaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2019-03-29 05:30:50 +0100
committerandroid-build-merger <android-build-merger@google.com>2019-03-29 05:30:50 +0100
commit2cc882c2f86c63177027570bd68d4c3a7c034e13 (patch)
tree13ec966169408c527ea36dbab4f413224c160b3a /applypatch
parentMerge "Remove the extern declaration of `sehandle` from roots.cpp." am: 047582b506 am: 9e23616e2e (diff)
parentMerge "Fix bogus error checking on unique_fd" am: a0fe1227b8 (diff)
downloadandroid_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.tar
android_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.tar.gz
android_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.tar.bz2
android_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.tar.lz
android_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.tar.xz
android_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.tar.zst
android_bootable_recovery-2cc882c2f86c63177027570bd68d4c3a7c034e13.zip
Diffstat (limited to 'applypatch')
-rw-r--r--applypatch/applypatch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index f9383ddeb..90d8e8604 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -76,7 +76,7 @@ static bool ReadPartitionToBuffer(const Partition& partition, FileContents* out,
}
android::base::unique_fd dev(open(partition.name.c_str(), O_RDONLY));
- if (!dev) {
+ if (dev == -1) {
PLOG(ERROR) << "Failed to open eMMC partition \"" << partition << "\"";
} else {
std::vector<unsigned char> buffer(partition.size);