universal7885: parts-aidl: Check r/w perms

This commit is contained in:
roynatech2544 2022-12-08 21:29:28 +09:00
commit ae4aef0ba3

View file

@ -112,7 +112,7 @@ namespace aidl::vendor::eureka::hardware::parts {
static std::mutex thread_lock;
static inline bool swapfile_exist(void) { return access(SWAP_PATH, F_OK) == 0; }
static inline bool swapfile_exist(void) { return access(SWAP_PATH, R_OK | W_OK) == 0; }
static void makeFile(int32_t mSwapSize) {
const std::lock_guard<std::mutex> lock(thread_lock);