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

Commit 8a0e1c51 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by android-build-merger
Browse files

Merge "libcutils: abort for invalid fd"

am: 76f99770

* commit '76f99770':
  libcutils: abort for invalid fd
parents c883cdec 76f99770
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -118,15 +118,16 @@ static int __ashmem_is_ashmem(int fd)
    }

    if (rdev) {
        ALOGE("illegal fd=%d mode=0%o rdev=%d:%d expected 0%o %d:%d",
        LOG_ALWAYS_FATAL("illegal fd=%d mode=0%o rdev=%d:%d expected 0%o %d:%d",
          fd, st.st_mode, major(st.st_rdev), minor(st.st_rdev),
          S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IRGRP,
          major(rdev), minor(rdev));
    } else {
        ALOGE("illegal fd=%d mode=0%o rdev=%d:%d expected 0%o",
        LOG_ALWAYS_FATAL("illegal fd=%d mode=0%o rdev=%d:%d expected 0%o",
          fd, st.st_mode, major(st.st_rdev), minor(st.st_rdev),
          S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IRGRP);
    }
    /* NOTREACHED */

    errno = ENOTTY;
    return -1;