Commit 7cf3cc30 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] hfs: cleanup HFS prints

Add the log level and a "hfs: " prefix to all kernel prints.
Signed-off-by: default avatarRoman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 634725a9
...@@ -64,7 +64,6 @@ int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd) ...@@ -64,7 +64,6 @@ int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd)
else else
e = rec - 1; e = rec - 1;
} while (b <= e); } while (b <= e);
//printk("%d: %d,%d,%d\n", bnode->this, b, e, rec);
if (rec != e && e >= 0) { if (rec != e && e >= 0) {
len = hfs_brec_lenoff(bnode, e, &off); len = hfs_brec_lenoff(bnode, e, &off);
keylen = hfs_brec_keylen(bnode, e); keylen = hfs_brec_keylen(bnode, e);
...@@ -127,7 +126,7 @@ int hfs_brec_find(struct hfs_find_data *fd) ...@@ -127,7 +126,7 @@ int hfs_brec_find(struct hfs_find_data *fd)
return res; return res;
invalid: invalid:
printk("HFS: inconsistency in B*Tree (%d,%d,%d,%u,%u)\n", printk(KERN_ERR "hfs: inconsistency in B*Tree (%d,%d,%d,%u,%u)\n",
height, bnode->height, bnode->type, nidx, parent); height, bnode->height, bnode->type, nidx, parent);
res = -EIO; res = -EIO;
release: release:
......
...@@ -198,7 +198,7 @@ void hfs_bnode_unlink(struct hfs_bnode *node) ...@@ -198,7 +198,7 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
// move down? // move down?
if (!node->prev && !node->next) { if (!node->prev && !node->next) {
printk("hfs_btree_del_level\n"); printk(KERN_DEBUG "hfs_btree_del_level\n");
} }
if (!node->parent) { if (!node->parent) {
tree->root = 0; tree->root = 0;
...@@ -219,7 +219,7 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid) ...@@ -219,7 +219,7 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
struct hfs_bnode *node; struct hfs_bnode *node;
if (cnid >= tree->node_count) { if (cnid >= tree->node_count) {
printk("HFS: request for non-existent node %d in B*Tree\n", cnid); printk(KERN_ERR "hfs: request for non-existent node %d in B*Tree\n", cnid);
return NULL; return NULL;
} }
...@@ -242,7 +242,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) ...@@ -242,7 +242,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
loff_t off; loff_t off;
if (cnid >= tree->node_count) { if (cnid >= tree->node_count) {
printk("HFS: request for non-existent node %d in B*Tree\n", cnid); printk(KERN_ERR "hfs: request for non-existent node %d in B*Tree\n", cnid);
return NULL; return NULL;
} }
......
...@@ -362,7 +362,7 @@ again: ...@@ -362,7 +362,7 @@ again:
end_off = hfs_bnode_read_u16(parent, end_rec_off); end_off = hfs_bnode_read_u16(parent, end_rec_off);
if (end_rec_off - end_off < diff) { if (end_rec_off - end_off < diff) {
printk("splitting index node...\n"); printk(KERN_DEBUG "hfs: splitting index node...\n");
fd->bnode = parent; fd->bnode = parent;
new_node = hfs_bnode_split(fd); new_node = hfs_bnode_split(fd);
if (IS_ERR(new_node)) if (IS_ERR(new_node))
......
...@@ -111,7 +111,7 @@ void hfs_btree_close(struct hfs_btree *tree) ...@@ -111,7 +111,7 @@ void hfs_btree_close(struct hfs_btree *tree)
while ((node = tree->node_hash[i])) { while ((node = tree->node_hash[i])) {
tree->node_hash[i] = node->next_hash; tree->node_hash[i] = node->next_hash;
if (atomic_read(&node->refcnt)) if (atomic_read(&node->refcnt))
printk("HFS: node %d:%d still has %d user(s)!\n", printk(KERN_ERR "hfs: node %d:%d still has %d user(s)!\n",
node->tree->cnid, node->this, atomic_read(&node->refcnt)); node->tree->cnid, node->this, atomic_read(&node->refcnt));
hfs_bnode_free(node); hfs_bnode_free(node);
tree->node_hash_cnt--; tree->node_hash_cnt--;
...@@ -252,7 +252,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) ...@@ -252,7 +252,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
kunmap(*pagep); kunmap(*pagep);
nidx = node->next; nidx = node->next;
if (!nidx) { if (!nidx) {
printk("create new bmap node...\n"); printk(KERN_DEBUG "hfs: create new bmap node...\n");
next_node = hfs_bmap_new_bmap(node, idx); next_node = hfs_bmap_new_bmap(node, idx);
} else } else
next_node = hfs_bnode_find(tree, nidx); next_node = hfs_bnode_find(tree, nidx);
...@@ -292,7 +292,7 @@ void hfs_bmap_free(struct hfs_bnode *node) ...@@ -292,7 +292,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
hfs_bnode_put(node); hfs_bnode_put(node);
if (!i) { if (!i) {
/* panic */; /* panic */;
printk("HFS: unable to free bnode %u. bmap not found!\n", node->this); printk(KERN_CRIT "hfs: unable to free bnode %u. bmap not found!\n", node->this);
return; return;
} }
node = hfs_bnode_find(tree, i); node = hfs_bnode_find(tree, i);
...@@ -300,7 +300,7 @@ void hfs_bmap_free(struct hfs_bnode *node) ...@@ -300,7 +300,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
return; return;
if (node->type != HFS_NODE_MAP) { if (node->type != HFS_NODE_MAP) {
/* panic */; /* panic */;
printk("HFS: invalid bmap found! (%u,%d)\n", node->this, node->type); printk(KERN_CRIT "hfs: invalid bmap found! (%u,%d)\n", node->this, node->type);
hfs_bnode_put(node); hfs_bnode_put(node);
return; return;
} }
...@@ -313,7 +313,7 @@ void hfs_bmap_free(struct hfs_bnode *node) ...@@ -313,7 +313,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
m = 1 << (~nidx & 7); m = 1 << (~nidx & 7);
byte = data[off]; byte = data[off];
if (!(byte & m)) { if (!(byte & m)) {
printk("HFS: trying to free free bnode %u(%d)\n", node->this, node->type); printk(KERN_CRIT "hfs: trying to free free bnode %u(%d)\n", node->this, node->type);
kunmap(page); kunmap(page);
hfs_bnode_put(node); hfs_bnode_put(node);
return; return;
......
...@@ -184,7 +184,7 @@ int hfs_cat_find_brec(struct super_block *sb, u32 cnid, ...@@ -184,7 +184,7 @@ int hfs_cat_find_brec(struct super_block *sb, u32 cnid,
type = rec.type; type = rec.type;
if (type != HFS_CDR_THD && type != HFS_CDR_FTH) { if (type != HFS_CDR_THD && type != HFS_CDR_FTH) {
printk("HFS-fs: Found bad thread record in catalog\n"); printk(KERN_ERR "hfs: found bad thread record in catalog\n");
return -EIO; return -EIO;
} }
......
...@@ -81,12 +81,12 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -81,12 +81,12 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
case 1: case 1:
hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength); hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength);
if (entry.type != HFS_CDR_THD) { if (entry.type != HFS_CDR_THD) {
printk("HFS: bad catalog folder thread\n"); printk(KERN_ERR "hfs: bad catalog folder thread\n");
err = -EIO; err = -EIO;
goto out; goto out;
} }
//if (fd.entrylength < HFS_MIN_THREAD_SZ) { //if (fd.entrylength < HFS_MIN_THREAD_SZ) {
// printk("HFS: truncated catalog thread\n"); // printk(KERN_ERR "hfs: truncated catalog thread\n");
// err = -EIO; // err = -EIO;
// goto out; // goto out;
//} //}
...@@ -105,7 +105,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -105,7 +105,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
for (;;) { for (;;) {
if (be32_to_cpu(fd.key->cat.ParID) != inode->i_ino) { if (be32_to_cpu(fd.key->cat.ParID) != inode->i_ino) {
printk("HFS: walked past end of dir\n"); printk(KERN_ERR "hfs: walked past end of dir\n");
err = -EIO; err = -EIO;
goto out; goto out;
} }
...@@ -114,7 +114,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -114,7 +114,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
len = hfs_mac2asc(sb, strbuf, &fd.key->cat.CName); len = hfs_mac2asc(sb, strbuf, &fd.key->cat.CName);
if (type == HFS_CDR_DIR) { if (type == HFS_CDR_DIR) {
if (fd.entrylength < sizeof(struct hfs_cat_dir)) { if (fd.entrylength < sizeof(struct hfs_cat_dir)) {
printk("HFS: small dir entry\n"); printk(KERN_ERR "hfs: small dir entry\n");
err = -EIO; err = -EIO;
goto out; goto out;
} }
...@@ -123,7 +123,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -123,7 +123,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
break; break;
} else if (type == HFS_CDR_FIL) { } else if (type == HFS_CDR_FIL) {
if (fd.entrylength < sizeof(struct hfs_cat_file)) { if (fd.entrylength < sizeof(struct hfs_cat_file)) {
printk("HFS: small file entry\n"); printk(KERN_ERR "hfs: small file entry\n");
err = -EIO; err = -EIO;
goto out; goto out;
} }
...@@ -131,7 +131,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -131,7 +131,7 @@ static int hfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
be32_to_cpu(entry.file.FlNum), DT_REG)) be32_to_cpu(entry.file.FlNum), DT_REG))
break; break;
} else { } else {
printk("HFS: bad catalog entry type %d\n", type); printk(KERN_ERR "hfs: bad catalog entry type %d\n", type);
err = -EIO; err = -EIO;
goto out; goto out;
} }
......
...@@ -35,9 +35,6 @@ ...@@ -35,9 +35,6 @@
#define dprint(flg, fmt, args...) \ #define dprint(flg, fmt, args...) \
if (flg & DBG_MASK) printk(fmt , ## args) if (flg & DBG_MASK) printk(fmt , ## args)
#define hfs_warn(format, args...) printk(KERN_WARNING format , ## args)
#define hfs_error(format, args...) printk(KERN_ERR format , ## args)
/* /*
* struct hfs_inode_info * struct hfs_inode_info
* *
......
...@@ -95,7 +95,6 @@ static int hfs_releasepage(struct page *page, gfp_t mask) ...@@ -95,7 +95,6 @@ static int hfs_releasepage(struct page *page, gfp_t mask)
} while (--i && nidx < tree->node_count); } while (--i && nidx < tree->node_count);
spin_unlock(&tree->hash_lock); spin_unlock(&tree->hash_lock);
} }
//printk("releasepage: %lu,%x = %d\n", page->index, mask, res);
return res ? try_to_free_buffers(page) : 0; return res ? try_to_free_buffers(page) : 0;
} }
......
...@@ -47,7 +47,7 @@ static int hfs_get_last_session(struct super_block *sb, ...@@ -47,7 +47,7 @@ static int hfs_get_last_session(struct super_block *sb,
*start = (sector_t)te.cdte_addr.lba << 2; *start = (sector_t)te.cdte_addr.lba << 2;
return 0; return 0;
} }
printk(KERN_ERR "HFS: Invalid session number or type of track\n"); printk(KERN_ERR "hfs: invalid session number or type of track\n");
return -EINVAL; return -EINVAL;
} }
ms_info.addr_format = CDROM_LBA; ms_info.addr_format = CDROM_LBA;
...@@ -100,7 +100,7 @@ int hfs_mdb_get(struct super_block *sb) ...@@ -100,7 +100,7 @@ int hfs_mdb_get(struct super_block *sb)
HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz); HFS_SB(sb)->alloc_blksz = size = be32_to_cpu(mdb->drAlBlkSiz);
if (!size || (size & (HFS_SECTOR_SIZE - 1))) { if (!size || (size & (HFS_SECTOR_SIZE - 1))) {
hfs_warn("hfs_fs: bad allocation block size %d\n", size); printk(KERN_ERR "hfs: bad allocation block size %d\n", size);
goto out_bh; goto out_bh;
} }
...@@ -117,7 +117,7 @@ int hfs_mdb_get(struct super_block *sb) ...@@ -117,7 +117,7 @@ int hfs_mdb_get(struct super_block *sb)
size >>= 1; size >>= 1;
brelse(bh); brelse(bh);
if (!sb_set_blocksize(sb, size)) { if (!sb_set_blocksize(sb, size)) {
printk("hfs_fs: unable to set blocksize to %u\n", size); printk(KERN_ERR "hfs: unable to set blocksize to %u\n", size);
goto out; goto out;
} }
...@@ -161,8 +161,8 @@ int hfs_mdb_get(struct super_block *sb) ...@@ -161,8 +161,8 @@ int hfs_mdb_get(struct super_block *sb)
} }
if (!HFS_SB(sb)->alt_mdb) { if (!HFS_SB(sb)->alt_mdb) {
hfs_warn("hfs_fs: unable to locate alternate MDB\n"); printk(KERN_WARNING "hfs: unable to locate alternate MDB\n");
hfs_warn("hfs_fs: continuing without an alternate MDB\n"); printk(KERN_WARNING "hfs: continuing without an alternate MDB\n");
} }
HFS_SB(sb)->bitmap = (__be32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0); HFS_SB(sb)->bitmap = (__be32 *)__get_free_pages(GFP_KERNEL, PAGE_SIZE < 8192 ? 1 : 0);
...@@ -177,7 +177,7 @@ int hfs_mdb_get(struct super_block *sb) ...@@ -177,7 +177,7 @@ int hfs_mdb_get(struct super_block *sb)
while (size) { while (size) {
bh = sb_bread(sb, off >> sb->s_blocksize_bits); bh = sb_bread(sb, off >> sb->s_blocksize_bits);
if (!bh) { if (!bh) {
hfs_warn("hfs_fs: unable to read volume bitmap\n"); printk(KERN_ERR "hfs: unable to read volume bitmap\n");
goto out; goto out;
} }
off2 = off & (sb->s_blocksize - 1); off2 = off & (sb->s_blocksize - 1);
...@@ -191,23 +191,23 @@ int hfs_mdb_get(struct super_block *sb) ...@@ -191,23 +191,23 @@ int hfs_mdb_get(struct super_block *sb)
HFS_SB(sb)->ext_tree = hfs_btree_open(sb, HFS_EXT_CNID, hfs_ext_keycmp); HFS_SB(sb)->ext_tree = hfs_btree_open(sb, HFS_EXT_CNID, hfs_ext_keycmp);
if (!HFS_SB(sb)->ext_tree) { if (!HFS_SB(sb)->ext_tree) {
hfs_warn("hfs_fs: unable to open extent tree\n"); printk(KERN_ERR "hfs: unable to open extent tree\n");
goto out; goto out;
} }
HFS_SB(sb)->cat_tree = hfs_btree_open(sb, HFS_CAT_CNID, hfs_cat_keycmp); HFS_SB(sb)->cat_tree = hfs_btree_open(sb, HFS_CAT_CNID, hfs_cat_keycmp);
if (!HFS_SB(sb)->cat_tree) { if (!HFS_SB(sb)->cat_tree) {
hfs_warn("hfs_fs: unable to open catalog tree\n"); printk(KERN_ERR "hfs: unable to open catalog tree\n");
goto out; goto out;
} }
attrib = mdb->drAtrb; attrib = mdb->drAtrb;
if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { if (!(attrib & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
hfs_warn("HFS-fs warning: Filesystem was not cleanly unmounted, " printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, "
"running fsck.hfs is recommended. mounting read-only.\n"); "running fsck.hfs is recommended. mounting read-only.\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) { if ((attrib & cpu_to_be16(HFS_SB_ATTRIB_SLOCK))) {
hfs_warn("HFS-fs: Filesystem is marked locked, mounting read-only.\n"); printk(KERN_WARNING "hfs: filesystem is marked locked, mounting read-only.\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
...@@ -303,7 +303,7 @@ void hfs_mdb_commit(struct super_block *sb) ...@@ -303,7 +303,7 @@ void hfs_mdb_commit(struct super_block *sb)
while (size) { while (size) {
bh = sb_bread(sb, block); bh = sb_bread(sb, block);
if (!bh) { if (!bh) {
hfs_warn("hfs_fs: unable to read volume bitmap\n"); printk(KERN_ERR "hfs: unable to read volume bitmap\n");
break; break;
} }
len = min((int)sb->s_blocksize - off, size); len = min((int)sb->s_blocksize - off, size);
......
...@@ -101,12 +101,12 @@ static int hfs_remount(struct super_block *sb, int *flags, char *data) ...@@ -101,12 +101,12 @@ static int hfs_remount(struct super_block *sb, int *flags, char *data)
return 0; return 0;
if (!(*flags & MS_RDONLY)) { if (!(*flags & MS_RDONLY)) {
if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) {
printk("HFS-fs warning: Filesystem was not cleanly unmounted, " printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, "
"running fsck.hfs is recommended. leaving read-only.\n"); "running fsck.hfs is recommended. leaving read-only.\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
*flags |= MS_RDONLY; *flags |= MS_RDONLY;
} else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) {
printk("HFS-fs: Filesystem is marked locked, leaving read-only.\n"); printk(KERN_WARNING "hfs: filesystem is marked locked, leaving read-only.\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
*flags |= MS_RDONLY; *flags |= MS_RDONLY;
} }
...@@ -229,21 +229,21 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) ...@@ -229,21 +229,21 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
switch (token) { switch (token) {
case opt_uid: case opt_uid:
if (match_int(&args[0], &tmp)) { if (match_int(&args[0], &tmp)) {
printk("HFS: uid requires an argument\n"); printk(KERN_ERR "hfs: uid requires an argument\n");
return 0; return 0;
} }
hsb->s_uid = (uid_t)tmp; hsb->s_uid = (uid_t)tmp;
break; break;
case opt_gid: case opt_gid:
if (match_int(&args[0], &tmp)) { if (match_int(&args[0], &tmp)) {
printk("HFS: gid requires an argument\n"); printk(KERN_ERR "hfs: gid requires an argument\n");
return 0; return 0;
} }
hsb->s_gid = (gid_t)tmp; hsb->s_gid = (gid_t)tmp;
break; break;
case opt_umask: case opt_umask:
if (match_octal(&args[0], &tmp)) { if (match_octal(&args[0], &tmp)) {
printk("HFS: umask requires a value\n"); printk(KERN_ERR "hfs: umask requires a value\n");
return 0; return 0;
} }
hsb->s_file_umask = (umode_t)tmp; hsb->s_file_umask = (umode_t)tmp;
...@@ -251,39 +251,39 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) ...@@ -251,39 +251,39 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
break; break;
case opt_file_umask: case opt_file_umask:
if (match_octal(&args[0], &tmp)) { if (match_octal(&args[0], &tmp)) {
printk("HFS: file_umask requires a value\n"); printk(KERN_ERR "hfs: file_umask requires a value\n");
return 0; return 0;
} }
hsb->s_file_umask = (umode_t)tmp; hsb->s_file_umask = (umode_t)tmp;
break; break;
case opt_dir_umask: case opt_dir_umask:
if (match_octal(&args[0], &tmp)) { if (match_octal(&args[0], &tmp)) {
printk("HFS: dir_umask requires a value\n"); printk(KERN_ERR "hfs: dir_umask requires a value\n");
return 0; return 0;
} }
hsb->s_dir_umask = (umode_t)tmp; hsb->s_dir_umask = (umode_t)tmp;
break; break;
case opt_part: case opt_part:
if (match_int(&args[0], &hsb->part)) { if (match_int(&args[0], &hsb->part)) {
printk("HFS: part requires an argument\n"); printk(KERN_ERR "hfs: part requires an argument\n");
return 0; return 0;
} }
break; break;
case opt_session: case opt_session:
if (match_int(&args[0], &hsb->session)) { if (match_int(&args[0], &hsb->session)) {
printk("HFS: session requires an argument\n"); printk(KERN_ERR "hfs: session requires an argument\n");
return 0; return 0;
} }
break; break;
case opt_type: case opt_type:
if (match_fourchar(&args[0], &hsb->s_type)) { if (match_fourchar(&args[0], &hsb->s_type)) {
printk("HFS+-fs: type requires a 4 character value\n"); printk(KERN_ERR "hfs: type requires a 4 character value\n");
return 0; return 0;
} }
break; break;
case opt_creator: case opt_creator:
if (match_fourchar(&args[0], &hsb->s_creator)) { if (match_fourchar(&args[0], &hsb->s_creator)) {
printk("HFS+-fs: creator requires a 4 character value\n"); printk(KERN_ERR "hfs: creator requires a 4 character value\n");
return 0; return 0;
} }
break; break;
...@@ -292,13 +292,13 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) ...@@ -292,13 +292,13 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
break; break;
case opt_codepage: case opt_codepage:
if (hsb->nls_disk) { if (hsb->nls_disk) {
printk("HFS+-fs: unable to change codepage\n"); printk(KERN_ERR "hfs: unable to change codepage\n");
return 0; return 0;
} }
p = match_strdup(&args[0]); p = match_strdup(&args[0]);
hsb->nls_disk = load_nls(p); hsb->nls_disk = load_nls(p);
if (!hsb->nls_disk) { if (!hsb->nls_disk) {
printk("HFS+-fs: unable to load codepage \"%s\"\n", p); printk(KERN_ERR "hfs: unable to load codepage \"%s\"\n", p);
kfree(p); kfree(p);
return 0; return 0;
} }
...@@ -306,13 +306,13 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) ...@@ -306,13 +306,13 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
break; break;
case opt_iocharset: case opt_iocharset:
if (hsb->nls_io) { if (hsb->nls_io) {
printk("HFS: unable to change iocharset\n"); printk(KERN_ERR "hfs: unable to change iocharset\n");
return 0; return 0;
} }
p = match_strdup(&args[0]); p = match_strdup(&args[0]);
hsb->nls_io = load_nls(p); hsb->nls_io = load_nls(p);
if (!hsb->nls_io) { if (!hsb->nls_io) {
printk("HFS: unable to load iocharset \"%s\"\n", p); printk(KERN_ERR "hfs: unable to load iocharset \"%s\"\n", p);
kfree(p); kfree(p);
return 0; return 0;
} }
...@@ -326,7 +326,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) ...@@ -326,7 +326,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb)
if (hsb->nls_disk && !hsb->nls_io) { if (hsb->nls_disk && !hsb->nls_io) {
hsb->nls_io = load_nls_default(); hsb->nls_io = load_nls_default();
if (!hsb->nls_io) { if (!hsb->nls_io) {
printk("HFS: unable to load default iocharset\n"); printk(KERN_ERR "hfs: unable to load default iocharset\n");
return 0; return 0;
} }
} }
...@@ -364,7 +364,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -364,7 +364,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
res = -EINVAL; res = -EINVAL;
if (!parse_options((char *)data, sbi)) { if (!parse_options((char *)data, sbi)) {
hfs_warn("hfs_fs: unable to parse mount options.\n"); printk(KERN_ERR "hfs: unable to parse mount options.\n");
goto bail; goto bail;
} }
...@@ -375,7 +375,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -375,7 +375,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
res = hfs_mdb_get(sb); res = hfs_mdb_get(sb);
if (res) { if (res) {
if (!silent) if (!silent)
hfs_warn("VFS: Can't find a HFS filesystem on dev %s.\n", printk(KERN_WARNING "hfs: can't find a HFS filesystem on dev %s.\n",
hfs_mdb_name(sb)); hfs_mdb_name(sb));
res = -EINVAL; res = -EINVAL;
goto bail; goto bail;
...@@ -407,7 +407,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -407,7 +407,7 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
bail_iput: bail_iput:
iput(root_inode); iput(root_inode);
bail_no_root: bail_no_root:
hfs_warn("hfs_fs: get root inode failed.\n"); printk(KERN_ERR "hfs: get root inode failed.\n");
bail: bail:
hfs_mdb_put(sb); hfs_mdb_put(sb);
return res; return res;
...@@ -454,7 +454,7 @@ static void __exit exit_hfs_fs(void) ...@@ -454,7 +454,7 @@ static void __exit exit_hfs_fs(void)
{ {
unregister_filesystem(&hfs_fs_type); unregister_filesystem(&hfs_fs_type);
if (kmem_cache_destroy(hfs_inode_cachep)) if (kmem_cache_destroy(hfs_inode_cachep))
printk(KERN_INFO "hfs_inode_cache: not all structures were freed\n"); printk(KERN_ERR "hfs_inode_cache: not all structures were freed\n");
} }
module_init(init_hfs_fs) module_init(init_hfs_fs)
......
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