From 1b544159a8aed238bc28a39fd1b975539e4e287a Mon Sep 17 00:00:00 2001 From: Kilyoung Shin Date: Thu, 10 Aug 2023 13:05:22 -0700 Subject: VTS gets vbmeta open error due to open_partition() is called with O_WRONLY Bug: 293489415 Test: run vts -m vts_security_avb_test -t AvbTest#HashtreeAlgorithm Signed-off-by: Kilyoung Shin (cherry picked from https://android-review.googlesource.com/q/commit:44b7409468568836097c8544ab024b25074ff21d) Merged-In: I911b5b992a861431a9359f84bc9494ebdaf5a9ad Change-Id: I911b5b992a861431a9359f84bc9494ebdaf5a9ad --- libavb_user/avb_ops_user.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavb_user/avb_ops_user.cpp b/libavb_user/avb_ops_user.cpp index 1ce5391..451dff2 100644 --- a/libavb_user/avb_ops_user.cpp +++ b/libavb_user/avb_ops_user.cpp @@ -270,7 +270,7 @@ static AvbIOResult get_size_of_partition(AvbOps* ops, int fd; AvbIOResult ret; - fd = open_partition(partition, O_WRONLY); + fd = open_partition(partition, O_RDONLY); if (fd == -1) { avb_error("Error opening \"", partition, "\" partition.\n"); ret = AVB_IO_RESULT_ERROR_IO; -- cgit v1.2.3