mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-06-01 11:44:16 +03:00
Prefix all SPL debug macros with 'S'
To avoid conflicts with symbols defined by dependent packages all debugging symbols have been prefixed with a 'S' for SPL. Any dependent package needing to integrate with the SPL debug should include the spl-debug.h header and use the 'S' prefixed macros. They must also build with DEBUG defined.
This commit is contained in:
@@ -28,11 +28,11 @@
|
||||
#include <sys/cmn_err.h>
|
||||
#include <spl-debug.h>
|
||||
|
||||
#ifdef DEBUG_SUBSYSTEM
|
||||
#undef DEBUG_SUBSYSTEM
|
||||
#ifdef SS_DEBUG_SUBSYS
|
||||
#undef SS_DEBUG_SUBSYS
|
||||
#endif
|
||||
|
||||
#define DEBUG_SUBSYSTEM S_GENERIC
|
||||
#define SS_DEBUG_SUBSYS SS_GENERIC
|
||||
|
||||
#ifndef NDEBUG
|
||||
static char ce_prefix[CE_IGNORE][10] = { "", "NOTICE: ", "WARNING: ", "" };
|
||||
@@ -61,10 +61,10 @@ vcmn_err(int ce, const char *fmt, va_list ap)
|
||||
vsnprintf(msg, MAXMSGLEN - 1, fmt, ap);
|
||||
|
||||
if (fmt[0] == '!')
|
||||
CDEBUG(D_INFO, "%s%s%s",
|
||||
SDEBUG(SD_INFO, "%s%s%s",
|
||||
ce_prefix[ce], msg, ce_suffix[ce]);
|
||||
else
|
||||
CERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]);
|
||||
SERROR("%s%s%s", ce_prefix[ce], msg, ce_suffix[ce]);
|
||||
}
|
||||
} /* vcmn_err() */
|
||||
EXPORT_SYMBOL(vcmn_err);
|
||||
|
||||
Reference in New Issue
Block a user