Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4f3cc016fd6b392d483adc586b6dfaabad081af
Commit:     d4f3cc016fd6b392d483adc586b6dfaabad081af
Parent:     91906a882a4c9541317bc4f4c7fa5d8b784ba198
Author:     Eric Sandeen <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 12 11:13:08 2007 +1000
Committer:  Lachlan McIlroy <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 18:13:05 2008 +1100

    [XFS] lose xfs_hex_dump in favor of print_hex_dump
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]>
    Signed-off-by: Tim Shimmin <[EMAIL PROTECTED]>
---
 fs/xfs/support/debug.c |    6 ++++++
 fs/xfs/xfs_error.c     |   31 -------------------------------
 fs/xfs/xfs_error.h     |    2 ++
 3 files changed, 8 insertions(+), 31 deletions(-)

diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c
index fa4fb18..c27abef 100644
--- a/fs/xfs/support/debug.c
+++ b/fs/xfs/support/debug.c
@@ -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);
+}
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index a4634d9..05e5365 100644
--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -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,
diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h
index 10e9d96..6490d2a 100644
--- a/fs/xfs/xfs_error.h
+++ b/fs/xfs/xfs_error.h
@@ -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)
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to