/* Remote target system call support.
- Copyright 1997, 1998, 2002, 2004, 2007 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2002, 2004, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GDB.
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);