File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ int os_sigio_async(int master, int slave)
171
171
172
172
flags = fcntl (master , F_GETFL );
173
173
if (flags < 0 )
174
- return errno ;
174
+ return - errno ;
175
175
176
176
if ((fcntl (master , F_SETFL , flags | O_NONBLOCK | O_ASYNC ) < 0 ) ||
177
177
(fcntl (master , F_SETOWN , os_getpid ()) < 0 ))
Original file line number Diff line number Diff line change @@ -344,12 +344,12 @@ int copy_context_skas0(unsigned long new_stack, int pid)
344
344
err = ptrace_setregs (pid , regs );
345
345
if (err < 0 )
346
346
panic ("copy_context_skas0 : PTRACE_SETREGS failed, "
347
- "pid = %d, errno = %d\n" , pid , errno );
347
+ "pid = %d, errno = %d\n" , pid , - err );
348
348
349
349
err = ptrace_setfpregs (pid , fp_regs );
350
350
if (err < 0 )
351
351
panic ("copy_context_skas0 : PTRACE_SETFPREGS failed, "
352
- "pid = %d, errno = %d\n" , pid , errno );
352
+ "pid = %d, errno = %d\n" , pid , - err );
353
353
354
354
/* set a well known return code for detection of child write failure */
355
355
child_data -> err = 12345678 ;
@@ -362,7 +362,7 @@ int copy_context_skas0(unsigned long new_stack, int pid)
362
362
pid = data -> err ;
363
363
if (pid < 0 )
364
364
panic ("copy_context_skas0 - stub-parent reports error %d\n" ,
365
- pid );
365
+ - pid );
366
366
367
367
/* Wait, until child has finished too: read child's result from
368
368
* child's stack and check it.
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ void init_registers(int pid)
104
104
err = ptrace (PTRACE_GETREGS , pid , 0 , exec_regs );
105
105
if (err )
106
106
panic ("check_ptrace : PTRACE_GETREGS failed, errno = %d" ,
107
- err );
107
+ errno );
108
108
109
109
errno = 0 ;
110
110
err = ptrace (PTRACE_GETFPXREGS , pid , 0 , exec_fpx_regs );
@@ -119,7 +119,7 @@ void init_registers(int pid)
119
119
err = ptrace (PTRACE_GETFPREGS , pid , 0 , exec_fp_regs );
120
120
if (err )
121
121
panic ("check_ptrace : PTRACE_GETFPREGS failed, errno = %d" ,
122
- err );
122
+ errno );
123
123
}
124
124
125
125
void get_safe_registers (unsigned long * regs , unsigned long * fp_regs )
Original file line number Diff line number Diff line change @@ -62,12 +62,12 @@ void init_registers(int pid)
62
62
err = ptrace (PTRACE_GETREGS , pid , 0 , exec_regs );
63
63
if (err )
64
64
panic ("check_ptrace : PTRACE_GETREGS failed, errno = %d" ,
65
- err );
65
+ errno );
66
66
67
67
err = ptrace (PTRACE_GETFPREGS , pid , 0 , exec_fp_regs );
68
68
if (err )
69
69
panic ("check_ptrace : PTRACE_GETFPREGS failed, errno = %d" ,
70
- err );
70
+ errno );
71
71
}
72
72
73
73
void get_safe_registers (unsigned long * regs , unsigned long * fp_regs )
Original file line number Diff line number Diff line change @@ -178,14 +178,14 @@ static void __init create_pid_file(void)
178
178
fd = open (file , O_RDWR | O_CREAT | O_EXCL , 0644 );
179
179
if (fd < 0 ){
180
180
printk ("Open of machine pid file \"%s\" failed: %s\n" ,
181
- file , strerror (- fd ));
181
+ file , strerror (errno ));
182
182
return ;
183
183
}
184
184
185
185
snprintf (pid , sizeof (pid ), "%d\n" , getpid ());
186
186
n = write (fd , pid , strlen (pid ));
187
187
if (n != strlen (pid ))
188
- printk ("Write of pid file failed - err = %d\n" , - n );
188
+ printk ("Write of pid file failed - err = %d\n" , errno );
189
189
190
190
close (fd );
191
191
}
You can’t perform that action at this time.
0 commit comments