Add comment to the __debug_print_header function.

This commit is contained in:
Enrico Fraccaroli (Galfurian)
2024-02-29 12:56:45 -05:00
parent 113e902a62
commit 9950584c12
+18 -12
View File
@@ -16,18 +16,12 @@
/// Determines the log level.
static int max_log_level = LOGLEVEL_DEBUG;
void dbg_putchar(char c)
{
outportb(SERIAL_COM1, (unsigned char)c);
}
void dbg_puts(const char *s)
{
while ((*s) != 0) {
dbg_putchar(*s++);
}
}
/// @brief Prints the correct header for the given debug level.
/// @param file the file origin of the debug message.
/// @param fun the function where the debug message was called.
/// @param line the line in the file where debug message was called.
/// @param log_level the log level.
/// @param header the header we want to show.
static inline void __debug_print_header(const char *file, const char *fun, int line, short log_level, char *header)
{
// "EMERG ", "ALERT ", "CRIT ", "ERR ", "WARNING", "NOTICE ", "INFO ", "DEBUG ", "DEFAULT",
@@ -75,6 +69,18 @@ static inline void __debug_print_header(const char *file, const char *fun, int l
}
}
void dbg_putchar(char c)
{
outportb(SERIAL_COM1, (unsigned char)c);
}
void dbg_puts(const char *s)
{
while ((*s) != 0) {
dbg_putchar(*s++);
}
}
void set_log_level(int level)
{
if ((level >= LOGLEVEL_EMERG) && (level <= LOGLEVEL_DEBUG)) {