Module: xenomai-jki
Branch: for-upstream
Commit: a81052922d09acb2707ae805df0d99fa7e5a8771
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a81052922d09acb2707ae805df0d99fa7e5a8771

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Jun  4 14:30:16 2010 +0200

rt_print: Properly return printed length

When rt_print is truncating an output chunk longer than
RT_PRINT_LINE_BREAK, it currently does not return the actually printed
length but the string length. Align this to normal printf which returns
the written length.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 src/rtdk/rt_print.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/rtdk/rt_print.c b/src/rtdk/rt_print.c
index ca948df..93b711a 100644
--- a/src/rtdk/rt_print.c
+++ b/src/rtdk/rt_print.c
@@ -150,6 +150,7 @@ static int print_to_buffer(FILE *stream, int priority, 
const char *format,
                /* Text was truncated, remove closing \0 that entry_head
                   already includes */
                len--;
+               res = len;
        }
 
        /* If we were able to write some text, finalise the entry */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to