PatchworkOS
Loading...
Searching...
No Matches
Log file

Userspace kernel log file. More...

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.
 

Detailed Description

Userspace 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 16 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 58 of file log_file.c.

References file, logFileOps, NULL, panic(), and sysfs_file_new().

Referenced by init_finalize().

◆ 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 85 of file log_file.c.

References lock, LOCK_SCOPE, log_file_advance_fake_cursor(), log_screen_clear(), log_screen_get_height(), log_screen_write(), MIN, ring, ring_data_length(), ring_get_byte(), ring_read_at(), and workingBuffer.

Referenced by log_screen_enable().

◆ 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 125 of file log_file.c.

References lock, LOCK_SCOPE, NULL, ring, and ring_write().

Referenced by log_write().