summaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/sys-i386
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-05-01 12:16:00 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-05-01 18:17:44 -0700
commit2ace87b9502d922397cabaf07d73e0b60c480ecf (patch)
treeb354425542c4b2cff20dc20cd65d0e8eeec2c7c4 /arch/um/os-Linux/sys-i386
parent347b3dc2faf34d63a96b41e3244b743cc72a2aa0 (diff)
[PATCH] uml: error handling fixes
Blairsorblade noticed some confusion between our use of a system call's return value and errno. This patch fixes a number of related bugs - using errno instead of a return value using a return value instead of errno forgetting to negate a error return to get a positive error code Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/os-Linux/sys-i386')
-rw-r--r--arch/um/os-Linux/sys-i386/registers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c
index 7a6f6b99ceff..516f66dd87e3 100644
--- a/arch/um/os-Linux/sys-i386/registers.c
+++ b/arch/um/os-Linux/sys-i386/registers.c
@@ -104,7 +104,7 @@ void init_registers(int pid)
err = ptrace(PTRACE_GETREGS, pid, 0, exec_regs);
if(err)
panic("check_ptrace : PTRACE_GETREGS failed, errno = %d",
- err);
+ errno);
errno = 0;
err = ptrace(PTRACE_GETFPXREGS, pid, 0, exec_fpx_regs);
@@ -119,7 +119,7 @@ void init_registers(int pid)
err = ptrace(PTRACE_GETFPREGS, pid, 0, exec_fp_regs);
if(err)
panic("check_ptrace : PTRACE_GETFPREGS failed, errno = %d",
- err);
+ errno);
}
void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)