From 3ffed21262bef69ee511e933c51c0be17fb61dae Mon Sep 17 00:00:00 2001
From: Hridya Valsaraju <hridya@google.com>
Date: Wed, 5 Sep 2018 12:07:33 -0700
Subject: [PATCH] Remove request for read access to partitions.

It is not needed for flash or erase.

Bug: 113648914
Test: fastboot flashall
Change-Id: I34ba57ac809934556569e3b38ab594969860882a
---
 fastboot/device/utility.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fastboot/device/utility.cpp b/fastboot/device/utility.cpp
index 0157e7fd45..d78c809225 100644
--- a/fastboot/device/utility.cpp
+++ b/fastboot/device/utility.cpp
@@ -80,7 +80,7 @@ bool OpenPartition(FastbootDevice* device, const std::string& name, PartitionHan
 
 std::optional<std::string> FindPhysicalPartition(const std::string& name) {
     std::string path = "/dev/block/by-name/" + name;
-    if (access(path.c_str(), R_OK | W_OK) < 0) {
+    if (access(path.c_str(), W_OK) < 0) {
         return {};
     }
     return path;
-- 
GitLab