1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 27 unchanged lines hidden (view full) --- 36 37namespace SparcISA { 38 39/// Target uname() handler. 40static SyscallReturn 41unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process, 42 ThreadContext *tc) 43{ |
44 int index = 0; 45 TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index)); |
46 47 strcpy(name->sysname, "Linux"); 48 strcpy(name->nodename, "m5.eecs.umich.edu"); 49 strcpy(name->release, "2.6.12-9-sparc64"); 50 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003"); 51 strcpy(name->machine, "sparc"); 52 53 name.copyOut(tc->getMemPort()); 54 55 return 0; 56} 57 58 59SyscallReturn getresuidFunc(SyscallDesc *desc, int num, 60 LiveProcess *p, ThreadContext *tc) 61{ 62 const IntReg id = htog(100); |
63 int index = 0; 64 Addr ruid = p->getSyscallArg(tc, index); 65 Addr euid = p->getSyscallArg(tc, index); 66 Addr suid = p->getSyscallArg(tc, index); |
67 //Handle the EFAULT case 68 //Set the ruid 69 if(ruid) 70 { 71 BufferArg ruidBuff(ruid, sizeof(IntReg)); 72 memcpy(ruidBuff.bufferPtr(), &id, sizeof(IntReg)); 73 ruidBuff.copyOut(tc->getMemPort()); 74 } --- 614 unchanged lines hidden --- |