From 59c22c33a090f98493e3e10a0f7b334d530b54af Mon Sep 17 00:00:00 2001 From: Daniel Zheng Date: Wed, 21 Jun 2023 14:30:46 -0700 Subject: [PATCH] Removing local image lookup from load_buf The initial logic for adding this in was incorrect. This changed had allowed us to do fastboot flash dts dt.img on command line. But really we should enforce that we pass in the path to the image. This change was added so the command line tool with resemble fastboot-info format which will support flash dts dt.img (situation where image name and partition name don't match). Test: fastboot flash {partition}, fastboot flashall Bug: 194686221 Change-Id: I62f170e14860d865453ab52793e346fe4066c6d4 --- fastboot/fastboot.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 46786553a..faaca1d69 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -1076,9 +1076,7 @@ static bool load_buf(const char* fname, struct fastboot_buffer* buf) { unique_fd fd(TEMP_FAILURE_RETRY(open(fname, O_RDONLY | O_BINARY))); if (fd == -1) { - auto path = find_item_given_name(fname); - fd = unique_fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_BINARY))); - if (fd == -1) return false; + return false; } struct stat s;