This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: Problems with tcgetattr()
- From: Andre-John Mas <ajmas at sympatico dot ca>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: <ecos-discuss at sourceware dot org>
- Date: Fri, 18 Aug 2006 11:25:56 -0400
- Subject: Re: Re: [ECOS] Problems with tcgetattr()
Fair enough. I have added the following code:
char* deviceName = "/dev/termiosX";
fd = open(deviceName, O_RDWR | O_NOCTTY);
but this fails at the 'isatty(fd)' test. Changing the device name
to to the value specified by 'console device name',in the ECC file:
"/dev/ttydiag"
gives me the same error as when I used STDIN_FILENO:
tcgetattr: Invalid argument
Any ideas?
Andre
Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Fri, Aug 18, 2006 at 10:20:30AM -0400, Andre-John Mas wrote:
>
> > I am trying this on STDIN_FILENO, based on examples I have seen
> > posted on the net. Currently I am connecting via the serial port,
> > but later on it is likely to be via a telnet or ssh connection. I
> > thought STDIN_FILENO was meant to be mapped to the current device?
>
> You are thinking in Unix way, not the eCos way. termio controls only
> work on the termios devices and no other devices.
>
> However, there is currently no ssh or telnet daemon for eCos, so when
> you implement these things, you can add support for this in however
> you implement telnet or ssh.
>
> Also, not there is no concept of a per thread STDIN. It is one STDIN
> for the whole system.
>
> Andrew
>
>
>
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss