提交 11b84487 编写于 作者: D Denis Vlasenko 提交者: Linus Torvalds

[PATCH] fix messages in fs/minix

Believe it or not, but in fs/minix/*, the oldest filesystem in the kernel,
something still can be fixed:

	printk("new_inode: bit already set");

"\n" is missing!

While at it, I also removed periods from the end of error messages and made
capitalization uniform.  Also s/i-node/inode/, s/printk (/printk(/
Signed-ff-by: NDenis Vlasenko <vda@ilport.com.ua>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 d4eb82c7
...@@ -56,7 +56,7 @@ void minix_free_block(struct inode * inode, int block) ...@@ -56,7 +56,7 @@ void minix_free_block(struct inode * inode, int block)
unsigned int bit,zone; unsigned int bit,zone;
if (block < sbi->s_firstdatazone || block >= sbi->s_nzones) { if (block < sbi->s_firstdatazone || block >= sbi->s_nzones) {
printk("trying to free block not in datazone\n"); printk("Trying to free block not in datazone\n");
return; return;
} }
zone = block - sbi->s_firstdatazone + 1; zone = block - sbi->s_firstdatazone + 1;
...@@ -124,7 +124,7 @@ minix_V1_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh) ...@@ -124,7 +124,7 @@ minix_V1_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh)
ino / MINIX_INODES_PER_BLOCK; ino / MINIX_INODES_PER_BLOCK;
*bh = sb_bread(sb, block); *bh = sb_bread(sb, block);
if (!*bh) { if (!*bh) {
printk("unable to read i-node block\n"); printk("Unable to read inode block\n");
return NULL; return NULL;
} }
p = (void *)(*bh)->b_data; p = (void *)(*bh)->b_data;
...@@ -149,7 +149,7 @@ minix_V2_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh) ...@@ -149,7 +149,7 @@ minix_V2_raw_inode(struct super_block *sb, ino_t ino, struct buffer_head **bh)
ino / MINIX2_INODES_PER_BLOCK; ino / MINIX2_INODES_PER_BLOCK;
*bh = sb_bread(sb, block); *bh = sb_bread(sb, block);
if (!*bh) { if (!*bh) {
printk("unable to read i-node block\n"); printk("Unable to read inode block\n");
return NULL; return NULL;
} }
p = (void *)(*bh)->b_data; p = (void *)(*bh)->b_data;
...@@ -204,7 +204,7 @@ void minix_free_inode(struct inode * inode) ...@@ -204,7 +204,7 @@ void minix_free_inode(struct inode * inode)
bh = sbi->s_imap[ino >> 13]; bh = sbi->s_imap[ino >> 13];
lock_kernel(); lock_kernel();
if (!minix_test_and_clear_bit(ino & 8191, bh->b_data)) if (!minix_test_and_clear_bit(ino & 8191, bh->b_data))
printk("minix_free_inode: bit %lu already cleared.\n", ino); printk("minix_free_inode: bit %lu already cleared\n", ino);
unlock_kernel(); unlock_kernel();
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
out: out:
...@@ -238,7 +238,7 @@ struct inode * minix_new_inode(const struct inode * dir, int * error) ...@@ -238,7 +238,7 @@ struct inode * minix_new_inode(const struct inode * dir, int * error)
return NULL; return NULL;
} }
if (minix_test_and_set_bit(j,bh->b_data)) { /* shouldn't happen */ if (minix_test_and_set_bit(j,bh->b_data)) { /* shouldn't happen */
printk("new_inode: bit already set"); printk("new_inode: bit already set\n");
unlock_kernel(); unlock_kernel();
iput(inode); iput(inode);
return NULL; return NULL;
......
...@@ -127,11 +127,11 @@ static int minix_remount (struct super_block * sb, int * flags, char * data) ...@@ -127,11 +127,11 @@ static int minix_remount (struct super_block * sb, int * flags, char * data)
mark_buffer_dirty(sbi->s_sbh); mark_buffer_dirty(sbi->s_sbh);
if (!(sbi->s_mount_state & MINIX_VALID_FS)) if (!(sbi->s_mount_state & MINIX_VALID_FS))
printk ("MINIX-fs warning: remounting unchecked fs, " printk("MINIX-fs warning: remounting unchecked fs, "
"running fsck is recommended.\n"); "running fsck is recommended\n");
else if ((sbi->s_mount_state & MINIX_ERROR_FS)) else if ((sbi->s_mount_state & MINIX_ERROR_FS))
printk ("MINIX-fs warning: remounting fs with errors, " printk("MINIX-fs warning: remounting fs with errors, "
"running fsck is recommended.\n"); "running fsck is recommended\n");
} }
return 0; return 0;
} }
...@@ -245,11 +245,11 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) ...@@ -245,11 +245,11 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
} }
if (!(sbi->s_mount_state & MINIX_VALID_FS)) if (!(sbi->s_mount_state & MINIX_VALID_FS))
printk ("MINIX-fs: mounting unchecked file system, " printk("MINIX-fs: mounting unchecked file system, "
"running fsck is recommended.\n"); "running fsck is recommended\n");
else if (sbi->s_mount_state & MINIX_ERROR_FS) else if (sbi->s_mount_state & MINIX_ERROR_FS)
printk ("MINIX-fs: mounting file system with errors, " printk("MINIX-fs: mounting file system with errors, "
"running fsck is recommended.\n"); "running fsck is recommended\n");
return 0; return 0;
out_iput: out_iput:
...@@ -273,19 +273,19 @@ static int minix_fill_super(struct super_block *s, void *data, int silent) ...@@ -273,19 +273,19 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
out_no_map: out_no_map:
if (!silent) if (!silent)
printk ("MINIX-fs: can't allocate map\n"); printk("MINIX-fs: can't allocate map\n");
goto out_release; goto out_release;
out_no_fs: out_no_fs:
if (!silent) if (!silent)
printk("VFS: Can't find a Minix or Minix V2 filesystem on device " printk("VFS: Can't find a Minix or Minix V2 filesystem "
"%s.\n", s->s_id); "on device %s\n", s->s_id);
out_release: out_release:
brelse(bh); brelse(bh);
goto out; goto out;
out_bad_hblock: out_bad_hblock:
printk("MINIX-fs: blocksize too small for device.\n"); printk("MINIX-fs: blocksize too small for device\n");
goto out; goto out;
out_bad_sb: out_bad_sb:
...@@ -524,7 +524,7 @@ int minix_sync_inode(struct inode * inode) ...@@ -524,7 +524,7 @@ int minix_sync_inode(struct inode * inode)
sync_dirty_buffer(bh); sync_dirty_buffer(bh);
if (buffer_req(bh) && !buffer_uptodate(bh)) if (buffer_req(bh) && !buffer_uptodate(bh))
{ {
printk ("IO error syncing minix inode [%s:%08lx]\n", printk("IO error syncing minix inode [%s:%08lx]\n",
inode->i_sb->s_id, inode->i_ino); inode->i_sb->s_id, inode->i_ino);
err = -1; err = -1;
} }
......
...@@ -25,9 +25,9 @@ static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) ...@@ -25,9 +25,9 @@ static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
int n = 0; int n = 0;
if (block < 0) { if (block < 0) {
printk("minix_bmap: block<0"); printk("minix_bmap: block<0\n");
} else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) { } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) {
printk("minix_bmap: block>big"); printk("minix_bmap: block>big\n");
} else if (block < 7) { } else if (block < 7) {
offsets[n++] = block; offsets[n++] = block;
} else if ((block -= 7) < 512) { } else if ((block -= 7) < 512) {
......
...@@ -25,9 +25,9 @@ static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) ...@@ -25,9 +25,9 @@ static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
int n = 0; int n = 0;
if (block < 0) { if (block < 0) {
printk("minix_bmap: block<0"); printk("minix_bmap: block<0\n");
} else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) { } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) {
printk("minix_bmap: block>big"); printk("minix_bmap: block>big\n");
} else if (block < 7) { } else if (block < 7) {
offsets[n++] = block; offsets[n++] = block;
} else if ((block -= 7) < 256) { } else if ((block -= 7) < 256) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册