From 511176398c81136786d5f6a955dcc6509f98f573 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 22 Jan 2009 09:41:47 -0800 Subject: [PATCH] Update debug.h to standardize VERIFY3_IMPL error messages in debug and non-debug mode --- include/sys/debug.h | 24 +++++++++++++----------- libtool | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/sys/debug.h b/include/sys/debug.h index 0d7b0b7726..b0f2bc7276 100644 --- a/include/sys/debug.h +++ b/include/sys/debug.h @@ -191,9 +191,9 @@ struct trace_page { }; struct page_collection { - struct list_head pc_pages; - spinlock_t pc_lock; - int pc_want_daemon_pages; + struct list_head pc_pages; + spinlock_t pc_lock; + int pc_want_daemon_pages; }; #define SBUG() spl_debug_bug(__FILE__, __FUNCTION__, __LINE__, 0); @@ -201,8 +201,8 @@ struct page_collection { #ifdef NDEBUG #define CDEBUG_STACK() (0) -#define CDEBUG_LIMIT(x, y, z, a...) ((void)0) -#define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) +#define CDEBUG_LIMIT(x, y, z, a...) ((void)0) +#define __CDEBUG_LIMIT(x, y, z, a...) ((void)0) #define CDEBUG(mask, format, a...) ((void)0) #define CWARN(fmt, a...) ((void)0) #define CERROR(fmt, a...) ((void)0) @@ -217,7 +217,7 @@ struct page_collection { #define __ASSERT(x) ((void)0) #define __ASSERT_TAGE_INVARIANT(x) ((void)0) #define ASSERT(x) ((void)0) -#define ASSERTF(x, y, z...) ((void)0) +#define ASSERTF(x, y, z...) ((void)0) #define VERIFY(cond) \ do { \ if (unlikely(!(cond))) { \ @@ -229,9 +229,10 @@ do { \ #define VERIFY3_IMPL(LEFT, OP, RIGHT, TYPE, FMT, CAST) \ do { \ if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ - printk(KERN_ERR "VERIFY3(" #LEFT " " #OP " " #RIGHT \ - " failed (" FMT ", " FMT ")\n", CAST (LEFT), \ - CAST (RIGHT)); \ + printk(KERN_ERR \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ + CAST (LEFT), CAST (RIGHT)); \ SBUG(); \ } \ } while (0) @@ -331,7 +332,8 @@ do { \ if (!((TYPE)(LEFT) OP (TYPE)(RIGHT))) { \ spl_debug_msg(NULL, DEBUG_SUBSYSTEM, D_EMERG, \ __FILE__, __FUNCTION__, __LINE__, \ - "VERIFY3(" FMT " " #OP " " FMT ")\n", \ + "VERIFY3(" #LEFT " " #OP " " #RIGHT ") " \ + "failed (" FMT " " #OP " " FMT ")\n", \ CAST (LEFT), CAST (RIGHT)); \ SBUG(); \ } \ @@ -405,7 +407,7 @@ do { \ __CDEBUG(NULL, subsys, D_TRACE, "Process leaving\n"); \ } while(0) -#define ENTRY __ENTRY(DEBUG_SUBSYSTEM) +#define ENTRY __ENTRY(DEBUG_SUBSYSTEM) #define EXIT __EXIT(DEBUG_SUBSYSTEM) #endif /* NDEBUG */ diff --git a/libtool b/libtool index 30d9b0952a..8dde1f20c9 100755 --- a/libtool +++ b/libtool @@ -1,7 +1,7 @@ #! /bin/sh # libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU spl 0.4.0) +# Generated automatically by (GNU spl 0.4.1) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001