Module: xenomai-jki Branch: for-upstream Commit: ca1fc9629699ad9ed78103e04a5812d762d4eacd URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=ca1fc9629699ad9ed78103e04a5812d762d4eacd
Author: Jan Kiszka <[email protected]> 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 <[email protected]> --- 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 [email protected] https://mail.gna.org/listinfo/xenomai-git
