This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: printf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]