OSDN Git Service

Merge tag 'ecryptfs-5.3-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[tomoyo/tomoyo-test1.git] / fs / ecryptfs / debug.c
index d131d07..1f65e99 100644 (file)
@@ -83,25 +83,9 @@ void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok)
  */
 void ecryptfs_dump_hex(char *data, int bytes)
 {
-       int i = 0;
-       int add_newline = 1;
-
        if (ecryptfs_verbosity < 1)
                return;
-       if (bytes != 0) {
-               printk(KERN_DEBUG "0x%.2x.", (unsigned char)data[i]);
-               i++;
-       }
-       while (i < bytes) {
-               printk("0x%.2x.", (unsigned char)data[i]);
-               i++;
-               if (i % 16 == 0) {
-                       printk("\n");
-                       add_newline = 0;
-               } else
-                       add_newline = 1;
-       }
-       if (add_newline)
-               printk("\n");
-}
 
+       print_hex_dump(KERN_DEBUG, "ecryptfs: ", DUMP_PREFIX_OFFSET, 16, 1,
+                      data, bytes, false);
+}