mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-14 05:08:19 +00:00
Supplement base/log.h with raw output function
This patch introduces the Genode::raw function that prints output directly via a low-level kernel mechanism, if available. On base-linux, it replaces the former 'raw_write_str' function. On base-hw, it replaces the former kernel/log.h interface. Fixes #2012
This commit is contained in:
committed by
Christian Helmuth
parent
ebdb1c6892
commit
2030ae678e
@ -43,6 +43,7 @@
|
||||
#include <util/string.h>
|
||||
#include <base/printf.h>
|
||||
#include <base/snprintf.h>
|
||||
#include <base/log.h>
|
||||
|
||||
|
||||
/***********************************
|
||||
@ -50,14 +51,13 @@
|
||||
***********************************/
|
||||
|
||||
extern "C" void wait_for_continue(void);
|
||||
extern "C" int raw_write_str(const char *str);
|
||||
|
||||
#define PRAW(fmt, ...) \
|
||||
do { \
|
||||
char str[128]; \
|
||||
Genode::snprintf(str, sizeof(str), \
|
||||
ESC_ERR fmt ESC_END "\n", ##__VA_ARGS__); \
|
||||
raw_write_str(str); \
|
||||
Genode::raw(str); \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user