klog: apply new hal interface
* %LICENSE%
*/
-#include HAL
+#include "../hal/hal.h"
#include "../include/ioctl.h"
@@ -341,8 +341,10 @@ static void msgthr(void *arg)
int klog_write(const char *data, size_t len)
{
+ int i = 0;
+
#if KLOG_ENABLE
- int i = 0, overwrite = 0;
+ int overwrite = 0;
char c;
proc_lockSet(&klog_common.lock);
@@ -363,7 +365,8 @@ int klog_write(const char *data, size_t len)
_klog_updateReaders();
proc_lockClear(&klog_common.lock);
#else
- hal_consolePrint(ATTR_NORMAL, data);
+ for (i = 0; i < len; ++i)
+ hal_consolePutch(data[i]);
#endif /* KLOG_ENABLE */
return len;
