Added custom log function for CBM machines.

The log function writes directly to the screen. Combined with the usage of PFS this means that the POSIX layer of the C library isn't referenced anymore thus reducing the memory requirements.
This commit is contained in:
Oliver Schmidt 2016-10-15 23:36:53 +02:00
parent d864e73579
commit fb4c42a357
8 changed files with 60 additions and 8 deletions

View file

@ -32,7 +32,6 @@
*
*/
#include <unistd.h>
#include <string.h>
#include "net/ip/uip.h"
@ -43,8 +42,8 @@
void
uip_log(char *message)
{
write(STDERR_FILENO, message, strlen(message));
write(STDERR_FILENO, "\n", 1);
logscr(message, strlen(message));
logscr("\n", 1);
}
#endif /* UIP_LOGGING */
/*-----------------------------------------------------------------------------------*/
@ -52,9 +51,9 @@ uip_log(char *message)
void
log_message(const char *part1, const char *part2)
{
write(STDERR_FILENO, part1, strlen(part1));
write(STDERR_FILENO, part2, strlen(part2));
write(STDERR_FILENO, "\n", 1);
logscr(part1, strlen(part1));
logscr(part2, strlen(part2));
logscr("\n", 1);
}
#endif /* LOG_CONF_ENABLED */
/*-----------------------------------------------------------------------------------*/