This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: libgloss/arm: monitor_stderr [PATCH]
- From: Shaun Jackman <sjackman at gmail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 5 Aug 2005 12:33:09 -0400
- Subject: Re: libgloss/arm: monitor_stderr [PATCH]
- References: <7f45d9390508041039325d85d5@mail.gmail.com> <42F323E0.50303@redhat.com>
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
On 8/5/05, Nick Clifton <nickc@redhat.com> wrote:
> Hi Shaun,
>
> > 2005-08-04 Shaun Jackman <sjackman@gmail.com>
> >
> > * libgloss/syscalls.c (initialise_monitor_handles): Set
> > monitor_stdout to the result of SWI_open(":tt", "a")
> > instead of simply duplicating stdout.
>
> Assuming that nobody from the kernel world has a problem with this, then
> I would have no problem recommending that Jeff accepts it - with one
> proviso however:
>
> > + block[0] = (int) ":tt";
> > + block[2] = 3; /* length of filename */
> > + block[1] = 8; /* mode "a" */
> > + monitor_stderr = do_AngelSWI (AngelSWI_Reason_Open, (void *) block);
>
> I think that you ought to add a comment to the code explaining the
> situation (ie opening the same file name with different modes in order
> to allow the kernel to choose whether to use one or two file
> descriptors). Otherwise future programmers might come along and think
> that this is a bug.
>
> Cheers
> Nick
Will do. I suffered a hard drive crash recently (woe is me), but once
I get my development box up and running again, I'll get back to the
list with a patch. This might give a little time for the kernel folk
to speak up. Speaking of which, which kernels actually implement the
RDP/RDI SWI API? The only pseudo-kernel I know of is gdb.
Cheers,
Shaun