MOS Source Code
Loading...
Searching...
No Matches
printk.c File Reference
#include <mos/device/console.h>
#include <mos/lib/structures/list.h>
#include <mos/lib/sync/spinlock.h>
#include <mos/misc/cmdline.h>
#include <mos/misc/setup.h>
#include <mos/syslog/printk.h>
#include <mos_stdio.h>
#include <mos_string.h>
+ Include dependency graph for printk.c:

Go to the source code of this file.

Functions

 MOS_SETUP ("printk_console", printk_setup_console)
 
 MOS_EARLY_SETUP ("quiet", printk_setup_quiet)
 
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 lvprintk (loglevel_t loglevel, const char *fmt, va_list args)
 
bool printk_unquiet (void)
 
void printk_set_quiet (bool quiet)
 
void lprintk (loglevel_t loglevel, const char *format,...)
 
void printk (const char *format,...)
 

Variables

static console_tprintk_console = NULL
 
static bool printk_quiet = false
 

Function Documentation

◆ MOS_SETUP()

MOS_SETUP ( "printk_console" ,
printk_setup_console  )

Definition at line 15 of file printk.c.

+ Here is the call graph for this function:

◆ MOS_EARLY_SETUP()

MOS_EARLY_SETUP ( "quiet" ,
printk_setup_quiet  )

Definition at line 45 of file printk.c.

+ Here is the call graph for this function:

◆ deduce_level_color()

static void deduce_level_color ( int loglevel,
standard_color_t * fg,
standard_color_t * bg )
inlinestatic

Definition at line 51 of file printk.c.

Referenced by print_to_console().

◆ print_to_console()

static void print_to_console ( console_t * con,
loglevel_t loglevel,
const char * message,
size_t len )
static

Definition at line 66 of file printk.c.

Referenced by lvprintk().

+ Here is the call graph for this function:

◆ lvprintk()

void lvprintk ( loglevel_t loglevel,
const char * fmt,
va_list args )

Definition at line 78 of file printk.c.

Referenced by lprintk(), and printk().

+ Here is the call graph for this function:

◆ printk_unquiet()

bool printk_unquiet ( void )

Definition at line 99 of file printk.c.

Referenced by try_handle_kernel_panics_at().

◆ printk_set_quiet()

void printk_set_quiet ( bool quiet)

Definition at line 106 of file printk.c.

◆ lprintk()

void lprintk ( loglevel_t loglevel,
const char * format,
... )

Definition at line 111 of file printk.c.

Referenced by do_syslog(), mos_kwarn(), and test_engine_warning_handler().

+ Here is the call graph for this function:

◆ printk()

void printk ( const char * format,
... )

Definition at line 119 of file printk.c.

+ Here is the call graph for this function:

Variable Documentation

◆ printk_console

console_t* printk_console = NULL
static

Definition at line 12 of file printk.c.

Referenced by lvprintk(), and MOS_SETUP().

◆ printk_quiet

bool printk_quiet = false
static

Definition at line 13 of file printk.c.

Referenced by lvprintk(), MOS_EARLY_SETUP(), printk_set_quiet(), and printk_unquiet().