On 01/10/14 14:35, Мороз Олег wrote:
I've solved my problem using code changes diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.c b/c/src/lib/libbsp/i386/shared/comm/uart.c index 3c4d42a..3552fe6 100644 --- a/c/src/lib/libbsp/i386/shared/comm/uart.c +++ b/c/src/lib/libbsp/i386/shared/comm/uart.c @@ -568,12 +568,13 @@ BSP_uart_termios_read_com2(int uart) ssize_t BSP_uart_termios_write_com1(int minor, const char *buf, size_t len) { + if(len <= 0) + { + return 0; + } assert(buf != NULL); - if(len <= 0) - { - return 0; - } + /* If there TX buffer is busy - something is royally screwed up */ assert((uread(BSP_UART_COM1, LSR) & THRE) != 0); @@ -602,13 +603,13 @@ BSP_uart_termios_write_com1(int minor, const char *buf, size_t len) ssize_t BSP_uart_termios_write_com2(int minor, const char *buf, size_t len) { - assert(buf != NULL); + if(len <= 0) { return 0; } - + assert(buf != NULL); /* If there TX buffer is busy - something is royally screwed up */ assert((uread(BSP_UART_COM2, LSR) & THRE) != 0); Is it alright?
Yes, this looks all right, can you please send a complete patch. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel