mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-12-30 03:08:07 +03:00
Update kmod logging
This commit is contained in:
15
logging.h
15
logging.h
@@ -3,7 +3,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#define LOG_LEVEL (config.verbose)
|
||||
#define USE_SYSLOG (config.syslog)
|
||||
|
||||
#ifdef KERNEL_SPACE
|
||||
#include <linux/kernel.h>
|
||||
@@ -11,12 +10,16 @@
|
||||
#define printf pr_info
|
||||
#define perror pr_err
|
||||
|
||||
#define log_message(level, msg, ...) \
|
||||
(printf(msg, ##__VA_ARGS__))
|
||||
#define LOG_ERR KERN_ERR
|
||||
#define LOG_INFO KERN_INFO
|
||||
#define LOG_WARN KERN_WARNING
|
||||
|
||||
#define log_message(level, msg, ...) \
|
||||
(printk(level msg, ##__VA_ARGS__))
|
||||
|
||||
#define lgerror(ret, msg, ...) \
|
||||
(log_message(LOG_ERR, msg ": %d\n", ##__VA_ARGS__, ret))
|
||||
|
||||
#define lgerror(ret, msg, ...) __extension__ ({ \
|
||||
pr_err(msg ": %d\n", ##__VA_ARGS__, ret); \
|
||||
})
|
||||
#else
|
||||
#include <stdio.h> // IWYU pragma: export
|
||||
#include <errno.h>
|
||||
|
||||
Reference in New Issue
Block a user