Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26401
b: refs/heads/master
c: 2ace87b
h: refs/heads/master
i:
  26399: 5105c1f
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 2, 2006
1 parent 5a1fccb commit c1fb8dc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 347b3dc2faf34d63a96b41e3244b743cc72a2aa0
refs/heads/master: 2ace87b9502d922397cabaf07d73e0b60c480ecf
2 changes: 1 addition & 1 deletion trunk/arch/um/os-Linux/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int os_sigio_async(int master, int slave)

flags = fcntl(master, F_GETFL);
if(flags < 0)
return errno;
return -errno;

if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
(fcntl(master, F_SETOWN, os_getpid()) < 0))
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/um/os-Linux/skas/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ int copy_context_skas0(unsigned long new_stack, int pid)
err = ptrace_setregs(pid, regs);
if(err < 0)
panic("copy_context_skas0 : PTRACE_SETREGS failed, "
"pid = %d, errno = %d\n", pid, errno);
"pid = %d, errno = %d\n", pid, -err);

err = ptrace_setfpregs(pid, fp_regs);
if(err < 0)
panic("copy_context_skas0 : PTRACE_SETFPREGS failed, "
"pid = %d, errno = %d\n", pid, errno);
"pid = %d, errno = %d\n", pid, -err);

/* set a well known return code for detection of child write failure */
child_data->err = 12345678;
Expand All @@ -362,7 +362,7 @@ int copy_context_skas0(unsigned long new_stack, int pid)
pid = data->err;
if(pid < 0)
panic("copy_context_skas0 - stub-parent reports error %d\n",
pid);
-pid);

/* Wait, until child has finished too: read child's result from
* child's stack and check it.
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/os-Linux/sys-i386/registers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/os-Linux/sys-x86_64/registers.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ 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);

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)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/os-Linux/umid.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ static void __init create_pid_file(void)
fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0644);
if(fd < 0){
printk("Open of machine pid file \"%s\" failed: %s\n",
file, strerror(-fd));
file, strerror(errno));
return;
}

snprintf(pid, sizeof(pid), "%d\n", getpid());
n = write(fd, pid, strlen(pid));
if(n != strlen(pid))
printk("Write of pid file failed - err = %d\n", -n);
printk("Write of pid file failed - err = %d\n", errno);

close(fd);
}
Expand Down

0 comments on commit c1fb8dc

Please sign in to comment.