17 const char *kcon_name = arg;
18 if (!kcon_name || !
strlen(kcon_name))
20 pr_warn(
"No console name given for printk");
27 pr_emph(
"Selected console '%s' for future printk\n", kcon_name);
35 pr_emph(
"Selected console '%s' for future printk (prefix-based)\n", console->
name);
40 mos_warn(
"No console found for printk based on given name or prefix '%s'", kcon_name);
73 con->
ops->get_color(con, &fg, &bg);
#define mos_warn(fmt,...)
#define MOS_PRINTK_BUFFER_SIZE
size_t console_write_color(console_t *con, const char *data, size_t size, standard_color_t fg, standard_color_t bg)
console_t * console_get_by_prefix(const char *prefix)
console_t * console_get(const char *name)
MOSAPI int vsnprintf(char *__restrict buf, size_t size, const char *__restrict format, va_list args)
MOSAPI const char *__restrict format
#define list_foreach(t, v, h)
Iterate over a list.
bool cmdline_string_truthiness(const char *arg, bool default_value)
#define once()
Returns true for the first call, false for all subsequent calls.
static size_t strlen(const char *s)
bool printk_unquiet(void)
static console_t * printk_console
void printk_set_quiet(bool quiet)
void lvprintk(loglevel_t loglevel, const char *fmt, va_list args)
void printk(const char *format,...)
static void deduce_level_color(int loglevel, standard_color_t *fg, standard_color_t *bg)
static void print_to_console(console_t *con, loglevel_t loglevel, const char *message, size_t len)
void lprintk(loglevel_t loglevel, const char *format,...)
#define MOS_EARLY_SETUP(_param, _fn)
#define MOS_SETUP(_param, _fn)