[ECOS] Problem with SCANF function

bkankur connintel@gmail.com
Fri Mar 12 13:59:00 GMT 2010

Dear Friends,

I am using polling based serial driver by specifying buffer size(cbuf->len)
to zero through configuration tool.
When I call scanf function from application layer, I found that it is
calling serial_read function from file

For given function, static Cyg_ErrNo serial_read(cyg_io_handle_t handle,
void *_buf, cyg_uint32 *len)
I printed the argument values and found that *len=-1, which makes "while
(size++ < *len) " condition true always and my program gets stuck there.

I did similar thing for serial_write and I got *len value correct when I
call Printf function from user application.

I try to debug the /libc/sdio/current/src/input/scanf.cxx, but I couldn't
understand it. Can anyone please guide me where to look at for the error, in
my case *len = -1 which should be greater than 1 ?

Thank you,
Have a Good Day,
View this message in context: http://old.nabble.com/Problem-with-SCANF-function-tp27874746p27874746.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list