summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/debug.c')
-rw-r--r--fs/ecryptfs/debug.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c
index d131d070826f..1f65e99f9a41 100644
--- a/fs/ecryptfs/debug.c
+++ b/fs/ecryptfs/debug.c
@@ -83,25 +83,9 @@ void ecryptfs_dump_auth_tok(struct ecryptfs_auth_tok *auth_tok)
83 */ 83 */
84void ecryptfs_dump_hex(char *data, int bytes) 84void ecryptfs_dump_hex(char *data, int bytes)
85{ 85{
86 int i = 0;
87 int add_newline = 1;
88
89 if (ecryptfs_verbosity < 1) 86 if (ecryptfs_verbosity < 1)
90 return; 87 return;
91 if (bytes != 0) {
92 printk(KERN_DEBUG "0x%.2x.", (unsigned char)data[i]);
93 i++;
94 }
95 while (i < bytes) {
96 printk("0x%.2x.", (unsigned char)data[i]);
97 i++;
98 if (i % 16 == 0) {
99 printk("\n");
100 add_newline = 0;
101 } else
102 add_newline = 1;
103 }
104 if (add_newline)
105 printk("\n");
106}
107 88
89 print_hex_dump(KERN_DEBUG, "ecryptfs: ", DUMP_PREFIX_OFFSET, 16, 1,
90 data, bytes, false);
91}