]> err.no Git - linux-2.6/commitdiff
[XFS] lose xfs_hex_dump in favor of print_hex_dump
authorEric Sandeen <sandeen@sandeen.net>
Fri, 12 Oct 2007 01:13:08 +0000 (11:13 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Thu, 7 Feb 2008 07:13:05 +0000 (18:13 +1100)
No need for xfs to have its own hex dumping routine now that the kernel
has one.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:29847a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/support/debug.c
fs/xfs/xfs_error.c
fs/xfs/xfs_error.h

index fa4fb1820e75a368c8d4e45d461e4a450b50c754..c27abef7b84f9498821dfb9704e21b15bb86e781 100644 (file)
@@ -80,3 +80,9 @@ assfail(char *expr, char *file, int line)
        printk("Assertion failed: %s, file: %s, line: %d\n", expr, file, line);
        BUG();
 }
+
+void
+xfs_hex_dump(void *p, int length)
+{
+       print_hex_dump(KERN_ALERT, "", DUMP_PREFIX_OFFSET, 16, 1, p, length, 1);
+}
index a4634d94e561ab9624b272662b2a4a2841640309..05e5365d3c3170bd034c16e1cd79761e5dcf7bcf 100644 (file)
@@ -230,37 +230,6 @@ xfs_error_report(
        }
 }
 
-STATIC void
-xfs_hex_dump(void *p, int length)
-{
-       __uint8_t *uip = (__uint8_t*)p;
-       int     i;
-       char    sbuf[128], *s;
-
-       s = sbuf;
-       *s = '\0';
-       for (i=0; i<length; i++, uip++) {
-               if ((i % 16) == 0) {
-                       if (*s != '\0')
-                               cmn_err(CE_ALERT, "%s\n", sbuf);
-                       s = sbuf;
-                       sprintf(s, "0x%x: ", i);
-                       while( *s != '\0')
-                               s++;
-               }
-               sprintf(s, "%02x ", *uip);
-
-               /*
-                * the kernel sprintf is a void; user sprintf returns
-                * the sprintf'ed string's length.  Find the new end-
-                * of-string
-                */
-               while( *s != '\0')
-                       s++;
-       }
-       cmn_err(CE_ALERT, "%s\n", sbuf);
-}
-
 void
 xfs_corruption_error(
        char            *tag,
index 10e9d9619ae5779ddb3a89437bad9b4abbc56af3..6490d2a9f8e1268d6bea93782eecc89f66f34b48 100644 (file)
@@ -174,6 +174,8 @@ extern void xfs_cmn_err(int panic_tag, int level, struct xfs_mount *mp,
 /* PRINTFLIKE3 */
 extern void xfs_fs_cmn_err(int level, struct xfs_mount *mp, char *fmt, ...);
 
+extern void xfs_hex_dump(void *p, int length);
+
 #define xfs_fs_repair_cmn_err(level, mp, fmt, args...) \
        xfs_fs_cmn_err(level, mp, fmt "  Unmount and run xfs_repair.", ## args)