mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
MIPS: Switch over to generic sys_execve and kernel_execve.
This version contains a few updates by David Daney, in particular it's now using __builtin_frame_address() instead of asm() which depending on personal taste, is slightly more appealing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
8f54bcacbc
commit
baf9ff74ed
7 changed files with 19 additions and 76 deletions
|
@ -3,7 +3,6 @@
|
|||
*
|
||||
* Copyright (C) 2000 Silicon Graphics, Inc.
|
||||
* Written by Ulf Carlsson (ulfc@engr.sgi.com)
|
||||
* sys32_execve from ia64/ia32 code, Feb 2000, Kanoj Sarcar (kanoj@sgi.com)
|
||||
*/
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/mm.h>
|
||||
|
@ -77,26 +76,6 @@ out:
|
|||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* sys_execve() executes a new program.
|
||||
*/
|
||||
asmlinkage int sys32_execve(nabi_no_regargs struct pt_regs regs)
|
||||
{
|
||||
int error;
|
||||
struct filename *filename;
|
||||
|
||||
filename = getname(compat_ptr(regs.regs[4]));
|
||||
error = PTR_ERR(filename);
|
||||
if (IS_ERR(filename))
|
||||
goto out;
|
||||
error = compat_do_execve(filename->name, compat_ptr(regs.regs[5]),
|
||||
compat_ptr(regs.regs[6]), ®s);
|
||||
putname(filename);
|
||||
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
|
||||
#define RLIM_INFINITY32 0x7fffffff
|
||||
#define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue