forked from Imagelibrary/binutils-gdb
2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>
* callback.c (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add functions. * syscall.c (cb_syscall): Test for stdin/out/err, not just fd 0/1/2. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * callback.h (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add prototypes. 2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com> * sim/cris/c/freopen2.c: Added testcase.
This commit is contained in:
@@ -344,12 +344,12 @@ cb_syscall (cb, sc)
|
||||
errcode = EINVAL;
|
||||
goto FinishSyscall;
|
||||
}
|
||||
if (fd == 1)
|
||||
if (cb_is_stdout(cb, fd))
|
||||
{
|
||||
result = (int) (*cb->write_stdout) (cb, buf, bytes_read);
|
||||
(*cb->flush_stdout) (cb);
|
||||
}
|
||||
else if (fd == 2)
|
||||
else if (cb_is_stderr(cb, fd))
|
||||
{
|
||||
result = (int) (*cb->write_stderr) (cb, buf, bytes_read);
|
||||
(*cb->flush_stderr) (cb);
|
||||
|
||||
Reference in New Issue
Block a user