This is the mail archive of the ecos-patches@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]
Other format: [Raw text]

Serial I/O - proper return from tty write


Index: io/serial/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/io/serial/current/ChangeLog,v
retrieving revision 1.46
diff -u -5 -p -r1.46 ChangeLog
--- io/serial/current/ChangeLog	23 May 2002 23:06:23 -0000	1.46
+++ io/serial/current/ChangeLog	10 Dec 2002 15:28:10 -0000
@@ -1,5 +1,11 @@
+2002-12-10  Gary Thomas  <gthomas@ecoscentric.com>
+
+	* src/common/tty.c (tty_write): Only return number of characters
+	in original string which were written - don't include any CR/LF
+	expansion characters.
+
 2002-04-23  Jesper Skov  <jskov@redhat.com>
 
 	* tests/serial3.c (serial_test): Use 19200 baud rate when board
 	cannot handle 38400.
 	* tests/serial5.c (serial_test): Same.
Index: io/serial/current/src/common/tty.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/io/serial/current/src/common/tty.c,v
retrieving revision 1.9
diff -u -5 -p -r1.9 tty.c
--- io/serial/current/src/common/tty.c	23 May 2002 23:06:28 -0000	1.9
+++ io/serial/current/src/common/tty.c	10 Dec 2002 15:28:11 -0000
@@ -193,11 +193,10 @@ tty_write(cyg_io_handle_t handle, const 
             }
             actually_written += size;
             size = 0;
         }
     }
-    *len = actually_written;
     return res;
 }
 
 static Cyg_ErrNo 
 tty_read(cyg_io_handle_t handle, void *_buf, cyg_uint32 *len)


-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


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