mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-16 18:21:27 +00:00
Logginf cleanup
1. Make PR logging available in the release mode 2. Make /sys/kernel/scst_tgt/trace_level reflect currently available logging 3. Cleanup unused log levels from /sys/kernel/scst_tgt/trace_level Suggested-by: Consus <consus@gmx.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -157,6 +157,8 @@ do { \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define TRACE_PR(format, args...) TRACE(TRACE_PRES, format, ## args)
|
||||
|
||||
#ifdef CONFIG_SCST_DEBUG
|
||||
|
||||
#define PRINT_BUFFER(message, buff, len) \
|
||||
@@ -280,8 +282,6 @@ do { \
|
||||
TRACE_DBG_FLAG(TRACE_MGMT_DEBUG, format, ## args)
|
||||
#define TRACE_MGMT_DBG_SPECIAL(args...) \
|
||||
TRACE_DBG_FLAG(TRACE_MGMT_DEBUG|TRACE_SPECIAL, format, ## args)
|
||||
#define TRACE_PR(format, args...) \
|
||||
TRACE_DBG_FLAG(TRACE_PRES, format, ## args)
|
||||
#define TRACE_BLOCK(format, args...) \
|
||||
TRACE_DBG_FLAG(TRACE_BLOCKING, format, ## args)
|
||||
|
||||
@@ -369,7 +369,6 @@ do { \
|
||||
#define TRACE_DBG_SPECIAL(format, args...) no_printk(format, ##args)
|
||||
#define TRACE_MGMT_DBG(format, args...) no_printk(format, ##args)
|
||||
#define TRACE_MGMT_DBG_SPECIAL(format, args...) no_printk(format, ##args)
|
||||
#define TRACE_PR(format, args...) do {} while (0)
|
||||
#define TRACE_BLOCK(format, args...) no_printk(format, ##args)
|
||||
#define TRACE_BUFFER(message, buff, len) \
|
||||
((void)(message), (void)(buff), (void)(len))
|
||||
|
||||
@@ -162,6 +162,7 @@ static ssize_t scst_trace_level_show(const struct scst_trace_log *local_tbl,
|
||||
" echo \"all|none|default\" >trace_level\n"
|
||||
" echo \"value DEC|0xHEX|0OCT\" >trace_level\n"
|
||||
" echo \"add|del TOKEN\" >trace_level\n"
|
||||
#ifdef CONFIG_SCST_DEBUG
|
||||
"\nwhere TOKEN is one of [debug, function, line, pid,\n"
|
||||
#ifndef GENERATING_UPSTREAM_PATCH
|
||||
" entryexit, buff, mem, sg, out_of_mem,\n"
|
||||
@@ -170,8 +171,14 @@ static ssize_t scst_trace_level_show(const struct scst_trace_log *local_tbl,
|
||||
#endif
|
||||
" special, scsi, mgmt, minor,\n"
|
||||
" mgmt_dbg, scsi_serializing,\n"
|
||||
" retry, recv_bot, send_bot, recv_top, pr,\n"
|
||||
" block, send_top%s]\n", help != NULL ? help : "");
|
||||
" retry, pr, block%s]\n",
|
||||
#else /* CONFIG_SCST_DEBUG */
|
||||
"\nwhere TOKEN is one of [function, line, pid,"
|
||||
"out_of_mem, special, scsi, mgmt, minor,"
|
||||
"scsi_serializing, retry, pr%s]\n",
|
||||
|
||||
#endif /* CONFIG_SCST_DEBUG */
|
||||
help != NULL ? help : "");
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user