This file contains functions, variables and values to control the amount of debug messages given by this package. More...
Defines | |
#define | debug_msg(format, arg...) printk( KERN_DEBUG OUR_MODULE ": " format, ##arg ) |
Outputs a single debug message. | |
#define | DBG_LVL_NOTHING 0 |
Debug level nothing: no messages are displayed. | |
#define | DBG_LVL_ERROR 1 |
Debug level error: only error messages are displayed. | |
#define | DBG_LVL_SUMRY 2 |
Debug level summary: error and connect/disconnect, open/close messages are displayed. | |
#define | DBG_LVL_INFO 3 |
Debug level info: error, connect/disconnect, open/close messages and transferred data are displayed. | |
#define | DBG_LVL_DEBUG 4 |
Debug level debug: all messages are displayed, error, connect/disconnect, open/close, transferred data and full function debug messages. | |
#define | DBG_ERROR(format, arg...) |
Shortcut to output a debug-message for levels error and above. | |
#define | DBG_SUMRY(format, arg...) |
Shortcut to output a debug-message for levels summary and above. | |
#define | DBG_INFO(format, arg...) |
Shortcut to output a debug-message for levels info and above. | |
#define | DBG_DEBUG(format, arg...) |
Shortcut to output a debug-message for levels debug and above. | |
#define | debug_enter DBG_DEBUG( "enter\n" ) |
Shortcut to output a debug-message when a function is entered. | |
#define | debug_leave DBG_DEBUG( "leave\n" ) |
Shortcut to output a debug-message when a function is left. | |
#define | debug_err(ok, format, arg...) if( ! ok ) DBG_ERROR( format, ##arg ) |
Shortcut to output a debug-message when a 'not ok' situation is detected. | |
Functions | |
void | debug_show_level (void) |
Show the content of the debug_level variable in human readable form (with explanation). | |
Variables | |
int | debug_level |
The debug level of this package. |
This file contains functions, variables and values to control the amount of debug messages given by this package.
At startup (modprobe) of this package, the variable debug_level can be set to a value: modprobe elomax debug_level=3 This pacakge will set its amount of outputted debug-messages as dictated by this variable. Valid values for this variable are DBG_LVL_NOTHING, DBG_LVL_ERROR, DBG_LVL_SUMRY, DBG_LVL_INFO, DBG_LVL_DEBUG. When no (valid) value is given during the modprobe command, value DBG_LVL_SUMRY is assumed.
#define DBG_DEBUG | ( | format, | |||
arg... | ) |
if( DBG_LVL_DEBUG <= debug_level ) \ debug_msg( "%s: " format, __FUNCTION__, ##arg )
Shortcut to output a debug-message for levels debug and above.
#define DBG_ERROR | ( | format, | |||
arg... | ) |
if( DBG_LVL_ERROR <= debug_level ) \ debug_msg( "%s: " format, __FUNCTION__, ##arg )
Shortcut to output a debug-message for levels error and above.
#define DBG_INFO | ( | format, | |||
arg... | ) |
if( DBG_LVL_INFO <= debug_level ) \ debug_msg( "%s: " format, __FUNCTION__, ##arg )
Shortcut to output a debug-message for levels info and above.
#define DBG_SUMRY | ( | format, | |||
arg... | ) |
if( DBG_LVL_SUMRY <= debug_level ) \ debug_msg( "%s: " format, __FUNCTION__, ##arg )
Shortcut to output a debug-message for levels summary and above.
#define debug_msg | ( | format, | |||
arg... | ) | printk( KERN_DEBUG OUR_MODULE ": " format, ##arg ) |
Outputs a single debug message.
The string outputted is displayed in /var/log/syslog and dmesg.
int debug_level |
The debug level of this package.
The higher the value in this variable, the more debug messaging is displayed. This variable is mapped by udev to /sys/module/elomax/parameters/debug_level.