syscall_emul.hh (10629:7c649fc84bb9) syscall_emul.hh (10633:ae3b12c845b8)
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

190/// Target readlink() handler.
191SyscallReturn readlinkFunc(SyscallDesc *desc, int num,
192 LiveProcess *p, ThreadContext *tc,
193 int index = 0);
194SyscallReturn readlinkFunc(SyscallDesc *desc, int num,
195 LiveProcess *p, ThreadContext *tc);
196
197/// Target unlink() handler.
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

190/// Target readlink() handler.
191SyscallReturn readlinkFunc(SyscallDesc *desc, int num,
192 LiveProcess *p, ThreadContext *tc,
193 int index = 0);
194SyscallReturn readlinkFunc(SyscallDesc *desc, int num,
195 LiveProcess *p, ThreadContext *tc);
196
197/// Target unlink() handler.
198SyscallReturn unlinkHelper(SyscallDesc *desc, int num,
199 LiveProcess *p, ThreadContext *tc,
200 int index);
198SyscallReturn unlinkFunc(SyscallDesc *desc, int num,
199 LiveProcess *p, ThreadContext *tc);
200
201/// Target mkdir() handler.
202SyscallReturn mkdirFunc(SyscallDesc *desc, int num,
203 LiveProcess *p, ThreadContext *tc);
204
205/// Target rename() handler.

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

650{
651 int index = 0;
652 int dirfd = process->getSyscallArg(tc, index);
653 if (dirfd != OS::TGT_AT_FDCWD)
654 warn("openat: first argument not AT_FDCWD; unlikely to work");
655 return openFunc<OS>(desc, callnum, process, tc, 1);
656}
657
201SyscallReturn unlinkFunc(SyscallDesc *desc, int num,
202 LiveProcess *p, ThreadContext *tc);
203
204/// Target mkdir() handler.
205SyscallReturn mkdirFunc(SyscallDesc *desc, int num,
206 LiveProcess *p, ThreadContext *tc);
207
208/// Target rename() handler.

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

653{
654 int index = 0;
655 int dirfd = process->getSyscallArg(tc, index);
656 if (dirfd != OS::TGT_AT_FDCWD)
657 warn("openat: first argument not AT_FDCWD; unlikely to work");
658 return openFunc<OS>(desc, callnum, process, tc, 1);
659}
660
661/// Target unlinkat() handler.
662template <class OS>
663SyscallReturn
664unlinkatFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
665 ThreadContext *tc)
666{
667 int index = 0;
668 int dirfd = process->getSyscallArg(tc, index);
669 if (dirfd != OS::TGT_AT_FDCWD)
670 warn("unlinkat: first argument not AT_FDCWD; unlikely to work");
671
672 return unlinkHelper(desc, callnum, process, tc, 1);
673}
674
658/// Target facessat() handler
659template <class OS>
660SyscallReturn
661faccessatFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
662 ThreadContext *tc)
663{
664 int index = 0;
665 int dirfd = process->getSyscallArg(tc, index);

--- 760 unchanged lines hidden ---
675/// Target facessat() handler
676template <class OS>
677SyscallReturn
678faccessatFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
679 ThreadContext *tc)
680{
681 int index = 0;
682 int dirfd = process->getSyscallArg(tc, index);

--- 760 unchanged lines hidden ---