* [ECOS] problem with tcgetattr
@ 2002-05-31 8:47 Tom Rychener
0 siblings, 0 replies; only message in thread
From: Tom Rychener @ 2002-05-31 8:47 UTC (permalink / raw)
To: ecos-discuss
Hello,
I'm trying to port Trillium's ISDN stack which currently runs on our linux
platform to eCos and I have some trouble with termios function: tcgetattr.
This is what the program does.
FILE* fl = (FILE*) stdin;
int fd = fileno(fl);
tcgetattr(fd, &t);
This function, tcgetattr fails (returns -1 with errno set to "invalid
argument").
I had a look to functions called by tcgetattr :
tcgetattr (fildes=0, termios_p=0x4f738) at
//e/ecos/REDHAT~1/eCos/packages/io/serial/current/src/common/termios.c:160
calls
ret = fp->f_ops->fo_getinfo( fp, CYG_IO_GET_CONFIG_TERMIOS,
termios_p, len);
which for a device is mapped to
dev_fo_getinfo (fp=0x4d3e8, key=1024, buf=0x4f738, len=40)
and this function calls (devfs.cxx l452)
err = cyg_io_get_config( (cyg_io_handle_t)fp->f_data, key, buf,
&ll );
then this function calls (iosys.c l257)
t->handlers->get_config(handle, key, buf, len);
which is mapped for a serial device to
serial_get_config (handle=0x3f12c, key=1024, xbuf=0x4f6fc,
len=0x4f738)
It seems that the problem is about the "key", because serial_get_config only
tests CYG_IO_GET_CONFIG_SERIAL_xxx which differ from
CYG_IO_GET_CONFIG_TERMIOS, and so generates an error.
I have enabled CYGPKG_IO_SERIAL_TERMIOS_TERMIOS0,
CYGPKG_IO_SERIAL_TERMIOS_TERMIOS1, and CYGPKG_IO_SERIAL_TERMIOS_TERMIOS2 in
my configuration, and it doesnt make a difference. I would like
t->handlers->getconfig(handle, key, buf, len) function to go to
termios_get_config(handle, key, buf, len) in termiostty.c
Any ideas how I can make this happen? Any help would be greatly
appreciated.
Thanks - Tom (tom.rychener@iitele.com)
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-31 15:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-31 8:47 [ECOS] problem with tcgetattr Tom Rychener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).