fs/affs: convert printk to pr_foo()
-All printk(KERN_foo converted to pr_foo() -Default printk converted to pr_warn() -Add pr_fmt to affs.h Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0c89d67016
commit
0158de12b0
4 changed files with 26 additions and 23 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
#ifdef pr_fmt
|
||||||
|
#undef pr_fmt
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/buffer_head.h>
|
#include <linux/buffer_head.h>
|
||||||
|
|
|
@ -451,10 +451,10 @@ affs_error(struct super_block *sb, const char *function, const char *fmt, ...)
|
||||||
vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args);
|
vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
printk(KERN_CRIT "AFFS error (device %s): %s(): %s\n", sb->s_id,
|
pr_crit("error (device %s): %s(): %s\n", sb->s_id,
|
||||||
function,ErrorBuffer);
|
function,ErrorBuffer);
|
||||||
if (!(sb->s_flags & MS_RDONLY))
|
if (!(sb->s_flags & MS_RDONLY))
|
||||||
printk(KERN_WARNING "AFFS: Remounting filesystem read-only\n");
|
pr_warn("Remounting filesystem read-only\n");
|
||||||
sb->s_flags |= MS_RDONLY;
|
sb->s_flags |= MS_RDONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ affs_warning(struct super_block *sb, const char *function, const char *fmt, ...)
|
||||||
vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args);
|
vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
printk(KERN_WARNING "AFFS warning (device %s): %s(): %s\n", sb->s_id,
|
pr_warn("(device %s): %s(): %s\n", sb->s_id,
|
||||||
function,ErrorBuffer);
|
function,ErrorBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) {
|
if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) {
|
||||||
printk(KERN_NOTICE "AFFS: Bitmap invalid - mounting %s read only\n",
|
pr_notice("Bitmap invalid - mounting %s read only\n", sb->s_id);
|
||||||
sb->s_id);
|
|
||||||
*flags |= MS_RDONLY;
|
*flags |= MS_RDONLY;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -268,7 +267,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
|
||||||
size = sbi->s_bmap_count * sizeof(*bm);
|
size = sbi->s_bmap_count * sizeof(*bm);
|
||||||
bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL);
|
bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL);
|
||||||
if (!sbi->s_bitmap) {
|
if (!sbi->s_bitmap) {
|
||||||
printk(KERN_ERR "AFFS: Bitmap allocation failed\n");
|
pr_err("Bitmap allocation failed\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,13 +281,13 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
|
||||||
bm->bm_key = be32_to_cpu(bmap_blk[blk]);
|
bm->bm_key = be32_to_cpu(bmap_blk[blk]);
|
||||||
bh = affs_bread(sb, bm->bm_key);
|
bh = affs_bread(sb, bm->bm_key);
|
||||||
if (!bh) {
|
if (!bh) {
|
||||||
printk(KERN_ERR "AFFS: Cannot read bitmap\n");
|
pr_err("Cannot read bitmap\n");
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (affs_checksum_block(sb, bh)) {
|
if (affs_checksum_block(sb, bh)) {
|
||||||
printk(KERN_WARNING "AFFS: Bitmap %u invalid - mounting %s read only.\n",
|
pr_warn("Bitmap %u invalid - mounting %s read only.\n",
|
||||||
bm->bm_key, sb->s_id);
|
bm->bm_key, sb->s_id);
|
||||||
*flags |= MS_RDONLY;
|
*flags |= MS_RDONLY;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -304,7 +303,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
|
||||||
affs_brelse(bmap_bh);
|
affs_brelse(bmap_bh);
|
||||||
bmap_bh = affs_bread(sb, be32_to_cpu(bmap_blk[blk]));
|
bmap_bh = affs_bread(sb, be32_to_cpu(bmap_blk[blk]));
|
||||||
if (!bmap_bh) {
|
if (!bmap_bh) {
|
||||||
printk(KERN_ERR "AFFS: Cannot read bitmap extension\n");
|
pr_err("Cannot read bitmap extension\n");
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved,
|
||||||
return 0;
|
return 0;
|
||||||
if (n != 512 && n != 1024 && n != 2048
|
if (n != 512 && n != 1024 && n != 2048
|
||||||
&& n != 4096) {
|
&& n != 4096) {
|
||||||
printk ("AFFS: Invalid blocksize (512, 1024, 2048, 4096 allowed)\n");
|
pr_warn("Invalid blocksize (512, 1024, 2048, 4096 allowed)\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*blocksize = n;
|
*blocksize = n;
|
||||||
|
@ -285,8 +285,8 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved,
|
||||||
/* Silently ignore the quota options */
|
/* Silently ignore the quota options */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk("AFFS: Unrecognized mount option \"%s\" "
|
pr_warn("Unrecognized mount option \"%s\" or missing value\n",
|
||||||
"or missing value\n", p);
|
p);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
|
if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block,
|
||||||
&blocksize,&sbi->s_prefix,
|
&blocksize,&sbi->s_prefix,
|
||||||
sbi->s_volume, &mount_flags)) {
|
sbi->s_volume, &mount_flags)) {
|
||||||
printk(KERN_ERR "AFFS: Error parsing options\n");
|
pr_err("Error parsing options\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
/* N.B. after this point s_prefix must be released */
|
/* N.B. after this point s_prefix must be released */
|
||||||
|
@ -407,8 +407,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!silent)
|
if (!silent)
|
||||||
printk(KERN_ERR "AFFS: No valid root block on device %s\n",
|
pr_err("No valid root block on device %s\n", sb->s_id);
|
||||||
sb->s_id);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
/* N.B. after this point bh must be released */
|
/* N.B. after this point bh must be released */
|
||||||
|
@ -420,7 +419,7 @@ got_root:
|
||||||
/* Find out which kind of FS we have */
|
/* Find out which kind of FS we have */
|
||||||
boot_bh = sb_bread(sb, 0);
|
boot_bh = sb_bread(sb, 0);
|
||||||
if (!boot_bh) {
|
if (!boot_bh) {
|
||||||
printk(KERN_ERR "AFFS: Cannot read boot block\n");
|
pr_err("Cannot read boot block\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
memcpy(sig, boot_bh->b_data, 4);
|
memcpy(sig, boot_bh->b_data, 4);
|
||||||
|
@ -433,8 +432,7 @@ got_root:
|
||||||
*/
|
*/
|
||||||
if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS
|
if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS
|
||||||
|| chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) {
|
|| chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) {
|
||||||
printk(KERN_NOTICE "AFFS: Dircache FS - mounting %s read only\n",
|
pr_notice("Dircache FS - mounting %s read only\n", sb->s_id);
|
||||||
sb->s_id);
|
|
||||||
sb->s_flags |= MS_RDONLY;
|
sb->s_flags |= MS_RDONLY;
|
||||||
}
|
}
|
||||||
switch (chksum) {
|
switch (chksum) {
|
||||||
|
@ -468,14 +466,14 @@ got_root:
|
||||||
sb->s_flags |= MS_NOEXEC;
|
sb->s_flags |= MS_NOEXEC;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_ERR "AFFS: Unknown filesystem on device %s: %08X\n",
|
pr_err("Unknown filesystem on device %s: %08X\n",
|
||||||
sb->s_id, chksum);
|
sb->s_id, chksum);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mount_flags & SF_VERBOSE) {
|
if (mount_flags & SF_VERBOSE) {
|
||||||
u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0];
|
u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0];
|
||||||
printk(KERN_NOTICE "AFFS: Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n",
|
pr_notice("Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n",
|
||||||
len > 31 ? 31 : len,
|
len > 31 ? 31 : len,
|
||||||
AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1,
|
AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1,
|
||||||
sig, sig[3] + '0', blocksize);
|
sig, sig[3] + '0', blocksize);
|
||||||
|
@ -506,7 +504,7 @@ got_root:
|
||||||
|
|
||||||
sb->s_root = d_make_root(root_inode);
|
sb->s_root = d_make_root(root_inode);
|
||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
printk(KERN_ERR "AFFS: Get root inode failed\n");
|
pr_err("AFFS: Get root inode failed\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue