PatchworkOS  c9fea19
A non-POSIX operating system.
Loading...
Searching...
No Matches
Log file

Userspace kernel log file. More...

Collaboration diagram for Log file:

Detailed Description

Userspace kernel log file.

The kernel logs are exposed to userspace via the readable, writable, and pollable /dev/klog file.

Macros

#define LOG_FILE_MAX_BUFFER   0x10000
 Maximum buffer size for the log file.
 

Functions

void log_file_expose (void)
 Expose the kernel log file to userspace in sysfs.
 
void log_file_flush_to_screen (void)
 Flush the content of the log file to the screen.
 
void log_file_write (const char *string, uint64_t length)
 Write a string to the kernel log file.
 

Macro Definition Documentation

◆ LOG_FILE_MAX_BUFFER

#define LOG_FILE_MAX_BUFFER   0x10000

Maximum buffer size for the log file.

Definition at line 18 of file log_file.h.

Function Documentation

◆ log_file_expose()

void log_file_expose ( void  )

Expose the kernel log file to userspace in sysfs.

Definition at line 62 of file log_file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_file_flush_to_screen()

void log_file_flush_to_screen ( void  )

Flush the content of the log file to the screen.

Definition at line 89 of file log_file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_file_write()

void log_file_write ( const char *  string,
uint64_t  length 
)

Write a string to the kernel log file.

Parameters
stringThe string to write.
lengthThe length of the string.

Definition at line 129 of file log_file.c.

Here is the call graph for this function:
Here is the caller graph for this function: