Pull ec into release branch
[pandora-kernel.git] / arch / um / os-Linux / sys-x86_64 / registers.c
index cb8e8a2..e6fc217 100644 (file)
@@ -14,7 +14,7 @@
 
 /* These are set once at boot time and not changed thereafter */
 
-static unsigned long exec_regs[HOST_FRAME_SIZE];
+static unsigned long exec_regs[MAX_REG_NR];
 static unsigned long exec_fp_regs[HOST_FP_SIZE];
 
 void init_thread_registers(union uml_pt_regs *to)
@@ -27,12 +27,12 @@ static int move_registers(int pid, int int_op, int fp_op,
                          union uml_pt_regs *regs)
 {
        if(ptrace(int_op, pid, 0, regs->skas.regs) < 0)
-               return(-errno);
+               return -errno;
 
        if(ptrace(fp_op, pid, 0, regs->skas.fp) < 0)
-               return(-errno);
+               return -errno;
 
-       return(0);
+       return 0;
 }
 
 void save_registers(int pid, union uml_pt_regs *regs)
@@ -72,7 +72,7 @@ void init_registers(int pid)
 
 void get_safe_registers(unsigned long *regs, unsigned long *fp_regs)
 {
-       memcpy(regs, exec_regs, HOST_FRAME_SIZE * sizeof(unsigned long));
+       memcpy(regs, exec_regs, sizeof(exec_regs));
        if(fp_regs != NULL)
                memcpy(fp_regs, exec_fp_regs,
                       HOST_FP_SIZE * sizeof(unsigned long));