Commit 1b71158b authored by Greg Ungerer's avatar Greg Ungerer Committed by David Woodhouse

[PATCH] fix calls to do_fork()

Change the m68knommu specific calls to do_fork() to match
its pid return vlue.
parent 1fe87cd0
...@@ -167,24 +167,20 @@ asmlinkage int m68k_fork(struct pt_regs *regs) ...@@ -167,24 +167,20 @@ asmlinkage int m68k_fork(struct pt_regs *regs)
asmlinkage int m68k_vfork(struct pt_regs *regs) asmlinkage int m68k_vfork(struct pt_regs *regs)
{ {
struct task_struct *p; return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int m68k_clone(struct pt_regs *regs) asmlinkage int m68k_clone(struct pt_regs *regs)
{ {
unsigned long clone_flags; unsigned long clone_flags;
unsigned long newsp; unsigned long newsp;
struct task_struct *p;
/* syscall2 puts clone_flags in d1 and usp in d2 */ /* syscall2 puts clone_flags in d1 and usp in d2 */
clone_flags = regs->d1; clone_flags = regs->d1;
newsp = regs->d2; newsp = regs->d2;
if (!newsp) if (!newsp)
newsp = rdusp(); newsp = rdusp();
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL); return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
int copy_thread(int nr, unsigned long clone_flags, int copy_thread(int nr, unsigned long clone_flags,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment