From 051b9d87e2bf1550ab6495493b9a2cfab2aa54f1 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 10 Sep 2018 17:23:27 -0700 Subject: uncrypt: write permission for f2fs_pin_file We need a write permission to set a flag in the file. Change-Id: I4896ecbe0fc04374e01d006b1c8acdb932e5d16d Signed-off-by: Jaegeuk Kim --- uncrypt/uncrypt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uncrypt') diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp index cf068ba81..d1970e534 100644 --- a/uncrypt/uncrypt.cpp +++ b/uncrypt/uncrypt.cpp @@ -300,7 +300,7 @@ static int produce_block_map(const char* path, const char* map_file, const char* int head_block = 0; int head = 0, tail = 0; - android::base::unique_fd fd(open(path, O_RDONLY)); + android::base::unique_fd fd(open(path, O_RDWR)); if (fd == -1) { PLOG(ERROR) << "failed to open " << path << " for reading"; return kUncryptFileOpenError; -- cgit v1.2.3