Commit 06038bed authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] uml: fix some ptrace functions returns values

From: Jeff Dike <jdike@addtoit.com>

This patch adds ptrace_setfpregs and makes these functions return -errno on
failure.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 70342aac
......@@ -17,17 +17,30 @@
int ptrace_getregs(long pid, unsigned long *regs_out)
{
return(ptrace(PTRACE_GETREGS, pid, 0, regs_out));
if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
return -errno;
return 0;
}
int ptrace_setregs(long pid, unsigned long *regs)
{
return(ptrace(PTRACE_SETREGS, pid, 0, regs));
if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
return -errno;
return 0;
}
int ptrace_getfpregs(long pid, unsigned long *regs)
{
return(ptrace(PTRACE_GETFPREGS, pid, 0, regs));
if (ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0)
return -errno;
return 0;
}
int ptrace_setfpregs(long pid, unsigned long *regs)
{
if (ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0)
return -errno;
return 0;
}
static void write_debugregs(int pid, unsigned long *regs)
......
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