From f695df295da82c8ef801906ad8b00b0e8afa7502 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 7 Mar 2019 09:27:31 -0800 Subject: Remove legacy BSP Signed-off-by: Nathaniel Graff --- bsp/libwrap/sys/write.c | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 bsp/libwrap/sys/write.c (limited to 'bsp/libwrap/sys/write.c') diff --git a/bsp/libwrap/sys/write.c b/bsp/libwrap/sys/write.c deleted file mode 100644 index b1e9a7e..0000000 --- a/bsp/libwrap/sys/write.c +++ /dev/null @@ -1,31 +0,0 @@ -/* See LICENSE of license details. */ - -#include -#include -#include -#include - -#include "platform.h" -#include "stub.h" -#include "weak_under_alias.h" - -ssize_t __wrap_write(int fd, const void* ptr, size_t len) -{ - const uint8_t * current = (const char *)ptr; - - if (isatty(fd)) { - for (size_t jj = 0; jj < len; jj++) { - while (UART0_REG(UART_REG_TXFIFO) & 0x80000000) ; - UART0_REG(UART_REG_TXFIFO) = current[jj]; - - if (current[jj] == '\n') { - while (UART0_REG(UART_REG_TXFIFO) & 0x80000000) ; - UART0_REG(UART_REG_TXFIFO) = '\r'; - } - } - return len; - } - - return _stub(EBADF); -} -weak_under_alias(write); -- cgit v1.2.3