syscall_emul.hh (13031:47510ddc366d) syscall_emul.hh (13371:1e796c9f369d)
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 681 unchanged lines hidden (view full) ---

690 */
691 if (!isopenat || (isopenat && tgt_dirfd == OS::TGT_AT_FDCWD)) {
692 path = p->fullPath(path);
693 } else if (!startswith(path, "/")) {
694 std::shared_ptr<FDEntry> fdep = ((*p->fds)[tgt_dirfd]);
695 auto ffdp = std::dynamic_pointer_cast<FileFDEntry>(fdep);
696 if (!ffdp)
697 return -EBADF;
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2015 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

--- 681 unchanged lines hidden (view full) ---

690 */
691 if (!isopenat || (isopenat && tgt_dirfd == OS::TGT_AT_FDCWD)) {
692 path = p->fullPath(path);
693 } else if (!startswith(path, "/")) {
694 std::shared_ptr<FDEntry> fdep = ((*p->fds)[tgt_dirfd]);
695 auto ffdp = std::dynamic_pointer_cast<FileFDEntry>(fdep);
696 if (!ffdp)
697 return -EBADF;
698 path.insert(0, ffdp->getFileName());
698 path.insert(0, ffdp->getFileName() + "/");
699 }
700
701 /**
702 * Since this is an emulated environment, we create pseudo file
703 * descriptors for device requests that have been registered with
704 * the process class through Python; this allows us to create a file
705 * descriptor for subsequent ioctl or mmap calls.
706 */

--- 1394 unchanged lines hidden ---
699 }
700
701 /**
702 * Since this is an emulated environment, we create pseudo file
703 * descriptors for device requests that have been registered with
704 * the process class through Python; this allows us to create a file
705 * descriptor for subsequent ioctl or mmap calls.
706 */

--- 1394 unchanged lines hidden ---