syscall_emul.hh (10633:ae3b12c845b8) | syscall_emul.hh (10793:0a4ec71cfddd) |
---|---|
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 --- 693 unchanged lines hidden (view full) --- 702template <class OS> 703SyscallReturn 704sysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process, 705 ThreadContext *tc) 706{ 707 708 int index = 0; 709 TypedBufferArg<typename OS::tgt_sysinfo> | 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 --- 693 unchanged lines hidden (view full) --- 702template <class OS> 703SyscallReturn 704sysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process, 705 ThreadContext *tc) 706{ 707 708 int index = 0; 709 TypedBufferArg<typename OS::tgt_sysinfo> |
710 sysinfo(process->getSyscallArg(tc, index)); | 710 sysinfo(process->getSyscallArg(tc, index)); |
711 712 sysinfo->uptime=seconds_since_epoch; 713 sysinfo->totalram=process->system->memSize(); 714 715 sysinfo.copyOut(tc->getMemProxy()); 716 717 return 0; 718} --- 191 unchanged lines hidden (view full) --- 910template <class OS> 911SyscallReturn 912fstatat64Func(SyscallDesc *desc, int callnum, LiveProcess *process, 913 ThreadContext *tc) 914{ 915 int index = 0; 916 int dirfd = process->getSyscallArg(tc, index); 917 if (dirfd != OS::TGT_AT_FDCWD) | 711 712 sysinfo->uptime=seconds_since_epoch; 713 sysinfo->totalram=process->system->memSize(); 714 715 sysinfo.copyOut(tc->getMemProxy()); 716 717 return 0; 718} --- 191 unchanged lines hidden (view full) --- 910template <class OS> 911SyscallReturn 912fstatat64Func(SyscallDesc *desc, int callnum, LiveProcess *process, 913 ThreadContext *tc) 914{ 915 int index = 0; 916 int dirfd = process->getSyscallArg(tc, index); 917 if (dirfd != OS::TGT_AT_FDCWD) |
918 warn("openat: first argument not AT_FDCWD; unlikely to work"); | 918 warn("fstatat64: first argument not AT_FDCWD; unlikely to work"); |
919 920 std::string path; 921 if (!tc->getMemProxy().tryReadString(path, 922 process->getSyscallArg(tc, index))) 923 return -EFAULT; 924 Addr bufPtr = process->getSyscallArg(tc, index); 925 926 // Adjust path for current working directory --- 516 unchanged lines hidden --- | 919 920 std::string path; 921 if (!tc->getMemProxy().tryReadString(path, 922 process->getSyscallArg(tc, index))) 923 return -EFAULT; 924 Addr bufPtr = process->getSyscallArg(tc, index); 925 926 // Adjust path for current working directory --- 516 unchanged lines hidden --- |