1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00
Bogdan Marinescu e7702bb0e2 Manual merge of remotefs/ into trunk. Tested with the simulator and (partially) on a ET-STM32 board. Other changes:
- FAT changed to support the new opendir/readdir/closedir mechanism, and to use lseek directly instead of ioctl (also fixed a bug in FAT's lseek that always returned 0 instead of file position).
- ET-STM32 console moved to UART2@19200bps (to allow RFS to run on UART0). If UART0 is needee for console, remember to disable RFS.
- freed 700+ bytes of RAM by changing the devman implementation to keep pointers instead of actual DM_DEVICE structures
- other minor code changes and fixes
2010-02-01 18:47:41 +00:00

25 lines
345 B
C

// Simple logging functions for the RFS server
#include "log.h"
#include <stdio.h>
#include <stdarg.h>
static int log_level;
void log_init( int level )
{
log_level = level;
}
void log_msg( const char *msg, ... )
{
va_list va;
if( log_level == LOG_ALL )
{
va_start( va, msg );
vprintf( msg, va );
va_end( va );
}
}