Deleted Added
sdiff udiff text old ( 12796:16dffc0e6c7f ) new ( 13031:47510ddc366d )
full compact
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;

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

27 *
28 * Authors: Steve Reinhardt
29 * Ali Saidi
30 */
31
32#include "sim/syscall_emul.hh"
33
34#include <fcntl.h>
35#include <unistd.h>
36
37#include <csignal>
38#include <iostream>
39#include <string>
40
41#include "arch/utility.hh"
42#include "base/chunk_generator.hh"
43#include "base/trace.hh"
44#include "config/the_isa.hh"
45#include "cpu/thread_context.hh"
46#include "dev/net/dist_iface.hh"
47#include "mem/page_table.hh"
48#include "sim/process.hh"
49#include "sim/sim_exit.hh"
50#include "sim/syscall_debug_macros.hh"
51#include "sim/syscall_desc.hh"
52#include "sim/system.hh"
53
54using namespace std;
55using namespace TheISA;

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

507unlinkHelper(SyscallDesc *desc, int num, Process *p, ThreadContext *tc,
508 int index)
509{
510 string path;
511
512 if (!tc->getMemProxy().tryReadString(path, p->getSyscallArg(tc, index)))
513 return -EFAULT;
514
515 // Adjust path for current working directory
516 path = p->fullPath(path);
517
518 int result = unlink(path.c_str());
519 return (result == -1) ? -errno : result;
520}
521
522SyscallReturn
523linkFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)

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

1100}
1101
1102SyscallReturn
1103accessFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
1104{
1105 return accessFunc(desc, callnum, p, tc, 0);
1106}
1107