#DPATCHLEVEL=0 2004-11-22 Guillem Jover * bogus/mach_assert.h: Change #ifdef DEBUG to #ifndef NDEBUG for assert et al. * kern/assert.h: Likewise. * kern/debug.h: Likewise. * util/debug.h: Likewise. * i386/i386/debug.h: Move dump_ss definition out of [DEBUG]. * linux/dev/glue/block.c (rdwr_full): Remove invalid assert. diff -Naur bogus/mach_assert.h bogus/mach_assert.h --- bogus/mach_assert.h 1997-02-25 22:28:02.000000000 +0100 +++ bogus/mach_assert.h 2004-11-22 02:27:51.000000000 +0100 @@ -1,4 +1,4 @@ -#ifdef DEBUG +#ifndef NDEBUG #define MACH_ASSERT 1 #else #define MACH_ASSERT 0 diff -Naur i386/i386/debug.h i386/i386/debug.h --- i386/i386/debug.h 2001-04-05 08:39:20.000000000 +0200 +++ i386/i386/debug.h 2004-11-22 02:56:11.000000000 +0100 @@ -23,6 +23,10 @@ #ifndef _I386_DEBUG_ #define _I386_DEBUG_ +/* Dump a saved state. + Probably a good idea to have this around + even when DEBUG isn't turned on. */ +void dump_ss(struct i386_saved_state *st); #ifdef DEBUG @@ -37,11 +41,6 @@ and all registers are saved. */ #ifndef ASSEMBLER -/* Dump a saved state. - Probably a good idea to have this around - even when DEBUG isn't turned on. */ -void dump_ss(struct i386_saved_state *st); - #define DEBUG_TRACE _debug_trace(__FILE__,__LINE__) /* Reset the debug trace buffer so it contains no valid entries. */ diff -Naur kern/assert.h kern/assert.h --- kern/assert.h 2001-04-05 08:39:20.000000000 +0200 +++ kern/assert.h 2004-11-22 02:35:08.000000000 +0100 @@ -31,7 +31,7 @@ #include -#ifdef DEBUG +#ifndef NDEBUG #define MACH_ASSERT 1 #endif diff -Naur kern/debug.h kern/debug.h --- kern/debug.h 2001-04-05 08:39:20.000000000 +0200 +++ kern/debug.h 2004-11-22 02:37:00.000000000 +0100 @@ -30,7 +30,7 @@ #include /*XXX*/ -#ifdef DEBUG +#ifndef NDEBUG #define here() printf("@ %s:%d\n", __FILE__, __LINE__) #define message(args) ({ printf("@ %s:%d: ", __FILE__, __LINE__); printf args; printf("\n"); }) @@ -46,7 +46,7 @@ __FILE__, __LINE__, (p), (id), (p->struct_id)); \ }) -#else /* !DEBUG */ +#else /* NDEBUG */ #define otsan() @@ -55,6 +55,6 @@ #define struct_id_denit(p) #define struct_id_verify(p,id) -#endif /* !DEBUG */ +#endif /* NDEBUG */ #endif /* _mach_debug__debug_ */ diff -Naur util/debug.h util/debug.h --- util/debug.h 1997-02-25 22:28:35.000000000 +0100 +++ util/debug.h 2004-11-22 02:33:56.000000000 +0100 @@ -34,7 +34,7 @@ #include -#ifdef DEBUG +#ifndef NDEBUG extern void panic(const char *fmt, ...); @@ -64,7 +64,7 @@ __FILE__, __LINE__, (p), (id), (p->struct_id)); \ }) -#else !DEBUG +#else /* NDEBUG */ #define otsan() #define assert(v) @@ -76,6 +76,6 @@ #define struct_id_denit(p) #define struct_id_verify(p,id) -#endif !DEBUG +#endif /* NDEBUG */ #endif _MACH_UTIL_DEBUG_H_ diff -Naur linux/dev/glue/block.c linux/dev/glue/block.c --- linux/dev/glue/block.c 2004-01-19 02:44:31.000000000 +0100 +++ linux/dev/glue/block.c 2004-11-22 03:26:58.000000000 +0100 @@ -595,7 +595,6 @@ struct buffer_head bhead[MAX_BUF], *bh, *bhp[MAX_BUF]; assert ((*off & BMASK) == 0); - assert (*resid >= bsize); nbuf = *resid >> bshift; blk = *off >> bshift;