This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: printf
- To: Joerg Rapka <joerg dot rapka at duagon dot com>
- Subject: Re: [ECOS] printf
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 05 Sep 2001 15:38:45 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <NDBBKEBGMLIMMPMJHHFDOEDECPAA.joerg.rapka@duagon.com>
Joerg Rapka wrote:
>
> Hello all
>
> The default console device is set by the configuration (e.g.
> CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE="/dev/tty0").
> Can this configuration be overridden by the application?
Obviously it can be overridden in the configuration at configuration time.
> I have two serial
> lines and the application
> should select one for printf.
Presumably you are instead wanting to change it dynamically at run time.
The normal way to do this is freopen() on stdout, but I notice that
freopen(), while by the letter standards compliant, isn't fully
implemented. An fclose() and fopen() on stdout may just work though.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine