Commit f175ff81 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

fs/cramfs: convert printk to pr_foo()

Use current logging functions.  No level printk converted to pr_err
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8b6aaf65
...@@ -277,7 +277,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -277,7 +277,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
/* check for wrong endianness */ /* check for wrong endianness */
if (super.magic == CRAMFS_MAGIC_WEND) { if (super.magic == CRAMFS_MAGIC_WEND) {
if (!silent) if (!silent)
printk(KERN_ERR "cramfs: wrong endianness\n"); pr_err("cramfs: wrong endianness\n");
return -EINVAL; return -EINVAL;
} }
...@@ -287,22 +287,22 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -287,22 +287,22 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
mutex_unlock(&read_mutex); mutex_unlock(&read_mutex);
if (super.magic != CRAMFS_MAGIC) { if (super.magic != CRAMFS_MAGIC) {
if (super.magic == CRAMFS_MAGIC_WEND && !silent) if (super.magic == CRAMFS_MAGIC_WEND && !silent)
printk(KERN_ERR "cramfs: wrong endianness\n"); pr_err("cramfs: wrong endianness\n");
else if (!silent) else if (!silent)
printk(KERN_ERR "cramfs: wrong magic\n"); pr_err("cramfs: wrong magic\n");
return -EINVAL; return -EINVAL;
} }
} }
/* get feature flags first */ /* get feature flags first */
if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
printk(KERN_ERR "cramfs: unsupported filesystem features\n"); pr_err("cramfs: unsupported filesystem features\n");
return -EINVAL; return -EINVAL;
} }
/* Check that the root inode is in a sane state */ /* Check that the root inode is in a sane state */
if (!S_ISDIR(super.root.mode)) { if (!S_ISDIR(super.root.mode)) {
printk(KERN_ERR "cramfs: root is not a directory\n"); pr_err("cramfs: root is not a directory\n");
return -EINVAL; return -EINVAL;
} }
/* correct strange, hard-coded permissions of mkcramfs */ /* correct strange, hard-coded permissions of mkcramfs */
...@@ -321,12 +321,12 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -321,12 +321,12 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
sbi->magic=super.magic; sbi->magic=super.magic;
sbi->flags=super.flags; sbi->flags=super.flags;
if (root_offset == 0) if (root_offset == 0)
printk(KERN_INFO "cramfs: empty filesystem"); pr_info("cramfs: empty filesystem");
else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
((root_offset != sizeof(struct cramfs_super)) && ((root_offset != sizeof(struct cramfs_super)) &&
(root_offset != 512 + sizeof(struct cramfs_super)))) (root_offset != 512 + sizeof(struct cramfs_super))))
{ {
printk(KERN_ERR "cramfs: bad root offset %lu\n", root_offset); pr_err("cramfs: bad root offset %lu\n", root_offset);
return -EINVAL; return -EINVAL;
} }
......
...@@ -37,7 +37,7 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen) ...@@ -37,7 +37,7 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen)
err = zlib_inflateReset(&stream); err = zlib_inflateReset(&stream);
if (err != Z_OK) { if (err != Z_OK) {
printk("zlib_inflateReset error %d\n", err); pr_err("zlib_inflateReset error %d\n", err);
zlib_inflateEnd(&stream); zlib_inflateEnd(&stream);
zlib_inflateInit(&stream); zlib_inflateInit(&stream);
} }
...@@ -48,8 +48,8 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen) ...@@ -48,8 +48,8 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen)
return stream.total_out; return stream.total_out;
err: err:
printk("Error %d while decompressing!\n", err); pr_err("Error %d while decompressing!\n", err);
printk("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen); pr_err("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen);
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment