Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54be99f2 authored by Justin Yun's avatar Justin Yun Committed by android-build-merger
Browse files

Merge "Make fs_mgr_access() available to user build" am: 8da39ef6 am: db8c37ef

am: d72616bc

Change-Id: I0486a3917b433d61ed0ef2203b625a635f44b030
parents 2acc999f d72616bc
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -55,6 +55,13 @@ using namespace std::literals;
using namespace android::dm;
using namespace android::fs_mgr;

static bool fs_mgr_access(const std::string& path) {
    auto save_errno = errno;
    auto ret = access(path.c_str(), F_OK) == 0;
    errno = save_errno;
    return ret;
}

#if ALLOW_ADBD_DISABLE_VERITY == 0  // If we are a user build, provide stubs

bool fs_mgr_overlayfs_mount_all(fstab*) {
@@ -221,13 +228,6 @@ const char* fs_mgr_mount_point(const char* mount_point) {
    return "/system";
}

bool fs_mgr_access(const std::string& path) {
    auto save_errno = errno;
    auto ret = access(path.c_str(), F_OK) == 0;
    errno = save_errno;
    return ret;
}

bool fs_mgr_rw_access(const std::string& path) {
    if (path.empty()) return false;
    auto save_errno = errno;