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

Commit 670919dd authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add failure logs in __ashmem_open_locked()" am: 546cf270 am: e5c827a2

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1394158

Change-Id: I1421789dcd93f0c1beeeddc19d57989465e4a59a
parents 3e8674df e5c827a2
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -212,13 +212,16 @@ static int __ashmem_open_locked()

    // fallback for APEX w/ use_vendor on Q, which would have still used /dev/ashmem
    if (fd < 0) {
        int saved_errno = errno;
        fd = TEMP_FAILURE_RETRY(open("/dev/ashmem", O_RDWR | O_CLOEXEC));
    }

        if (fd < 0) {
            /* Q launching devices and newer must not reach here since they should have been
             * able to open ashmem_device_path */
            ALOGE("Unable to open ashmem device %s (error = %s) and /dev/ashmem(error = %s)",
                  ashmem_device_path.c_str(), strerror(saved_errno), strerror(errno));
            return fd;
        }

    }
    struct stat st;
    int ret = TEMP_FAILURE_RETRY(fstat(fd, &st));
    if (ret < 0) {