]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/support/debug.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6-omap-h63xx.git] / fs / xfs / support / debug.c
index 08bbd3cb87aefb055088902550405c49a92be228..c27abef7b84f9498821dfb9704e21b15bb86e781 100644 (file)
@@ -17,7 +17,6 @@
  */
 #include <xfs.h>
 #include "debug.h"
-#include "spin.h"
 
 static char            message[1024];  /* keep it off the stack */
 static DEFINE_SPINLOCK(xfs_err_lock);
@@ -82,19 +81,8 @@ assfail(char *expr, char *file, int line)
        BUG();
 }
 
-#if ((defined(DEBUG) || defined(INDUCE_IO_ERRROR)) && !defined(NO_WANT_RANDOM))
-unsigned long random(void)
+void
+xfs_hex_dump(void *p, int length)
 {
-       static unsigned long    RandomValue = 1;
-       /* cycles pseudo-randomly through all values between 1 and 2^31 - 2 */
-       register long   rv = RandomValue;
-       register long   lo;
-       register long   hi;
-
-       hi = rv / 127773;
-       lo = rv % 127773;
-       rv = 16807 * lo - 2836 * hi;
-       if (rv <= 0) rv += 2147483647;
-       return RandomValue = rv;
+       print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_OFFSET, 16, 1, p, length, 1);
 }
-#endif /* DEBUG || INDUCE_IO_ERRROR || !NO_WANT_RANDOM */