/* sparc_execve() executes a new program after the asm stub has set things up for us. This should basically do what I want it to.  */
asmlinkage int sparc_execve(struct pt_regs *regs)
/* sparc_execve() executes a new program after the asm stub has set things up for us. This should basically do what I want it to.  */
asmlinkage int sparc_execve(struct pt_regs *regs)
{
	int error, base = 0;
	char *filename;
	if(regs->u_regs[UREG_G1] == 0)
		base = 1;
	filename = getname((char __user *)regs->u_regs[base + UREG_I0]);
	error = PTR_ERR(filename);
	if(IS_ERR(filename))
		goto out;
	error = do_execve(filename,
			  (char __user * __user *)regs->u_regs[base + UREG_I1],
			  (char __user * __user *)regs->u_regs[base + UREG_I2],
			  regs);
	putname(filename);
out:
	return error;
}