xen: Define debug_build() based on NDEBUG. Use it in a few printk's.

Signed-off-by: Keir Fraser <keir@xen.org>
This commit is contained in:
Keir Fraser committed 2013-01-30 02:51:04 -08:00
1 parent 563be9eb8e
commit 3b8e11e853
4 files changed
+5 -18

No files matched your search

+1 -6
View File
@@ -62,15 +62,10 @@ asmlinkage void __div0(void)
static void print_xen_info(void)
{
char taint_str[TAINT_STRING_MAX_LEN];
char debug = 'n';
#ifndef NDEBUG
debug = 'y';
#endif
printk("----[ Xen-%d.%d%s arm32 debug=%c %s ]----\n",
xen_major_version(), xen_minor_version(), xen_extra_version(),
debug, print_tainted(taint_str));
debug_build() ? 'y' : 'n', print_tainted(taint_str));
}
uint32_t *select_user_reg(struct cpu_user_regs *regs, int reg)
+1 -6
View File
@@ -28,15 +28,10 @@
static void print_xen_info(void)
{
char taint_str[TAINT_STRING_MAX_LEN];
char debug = 'n';
#ifndef NDEBUG
debug = 'y';
#endif
printk("----[ Xen-%d.%d%s x86_64 debug=%c %s ]----\n",
xen_major_version(), xen_minor_version(), xen_extra_version(),
debug, print_tainted(taint_str));
debug_build() ? 'y' : 'n', print_tainted(taint_str));
}
enum context { CTXT_hypervisor, CTXT_pv_guest, CTXT_hvm_guest };
+1 -6
View File
@@ -577,11 +577,6 @@ void __init console_init_preirq(void)
{
char *p;
int sh;
#ifndef NDEBUG
char debug = 'y';
#else
char debug = 'n';
#endif
serial_init_preirq();
@@ -616,7 +611,7 @@ void __init console_init_preirq(void)
printk("Xen version %d.%d%s (%s@%s) (%s) debug=%c %s\n",
xen_major_version(), xen_minor_version(), xen_extra_version(),
xen_compile_by(), xen_compile_domain(),
xen_compiler(), debug, xen_compile_date());
xen_compiler(), debug_build() ? 'y' : 'n', xen_compile_date());
printk("Latest ChangeSet: %s\n", xen_changeset());
if ( opt_sync_console )
+2
View File
@@ -41,8 +41,10 @@ do { \
#ifndef NDEBUG
#define ASSERT(p) \
do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)
#define debug_build() 1
#else
#define ASSERT(p) do { if ( 0 && (p) ); } while (0)
#define debug_build() 0
#endif
#define ABS(_x) ({ \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.