diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-01-18 20:43:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:22 -0500 |
commit | 634725a92938b0f282b17cec0b007dca77adebd2 (patch) | |
tree | c4dacf0c74ae3d322c37c010ee5cada2280eccca /fs/hfsplus | |
parent | 5131cf154ad1c6e584efa58d17a469d0b80f49bd (diff) |
[PATCH] hfs: cleanup HFS+ prints
Add the log level and a "hfs: " prefix to all kernel prints. (HFS and HFS+
will use the same prefix, as they share some code and could be merged at some
point.)
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/bfind.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/bnode.c | 11 | ||||
-rw-r--r-- | fs/hfsplus/brec.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/btree.c | 16 | ||||
-rw-r--r-- | fs/hfsplus/catalog.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/dir.c | 14 | ||||
-rw-r--r-- | fs/hfsplus/extents.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/inode.c | 5 | ||||
-rw-r--r-- | fs/hfsplus/options.c | 18 | ||||
-rw-r--r-- | fs/hfsplus/super.c | 49 | ||||
-rw-r--r-- | fs/hfsplus/wrapper.c | 4 |
11 files changed, 55 insertions, 72 deletions
diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c index 257cdde0514b..5007a41f1be9 100644 --- a/fs/hfsplus/bfind.c +++ b/fs/hfsplus/bfind.c | |||
@@ -64,7 +64,6 @@ int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd) | |||
64 | else | 64 | else |
65 | e = rec - 1; | 65 | e = rec - 1; |
66 | } while (b <= e); | 66 | } while (b <= e); |
67 | //printk("%d: %d,%d,%d\n", bnode->this, b, e, rec); | ||
68 | if (rec != e && e >= 0) { | 67 | if (rec != e && e >= 0) { |
69 | len = hfs_brec_lenoff(bnode, e, &off); | 68 | len = hfs_brec_lenoff(bnode, e, &off); |
70 | keylen = hfs_brec_keylen(bnode, e); | 69 | keylen = hfs_brec_keylen(bnode, e); |
@@ -127,7 +126,7 @@ int hfs_brec_find(struct hfs_find_data *fd) | |||
127 | return res; | 126 | return res; |
128 | 127 | ||
129 | invalid: | 128 | invalid: |
130 | printk("HFS+-fs: inconsistency in B*Tree (%d,%d,%d,%u,%u)\n", | 129 | printk(KERN_ERR "hfs: inconsistency in B*Tree (%d,%d,%d,%u,%u)\n", |
131 | height, bnode->height, bnode->type, nidx, parent); | 130 | height, bnode->height, bnode->type, nidx, parent); |
132 | res = -EIO; | 131 | res = -EIO; |
133 | release: | 132 | release: |
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 930cd9212de8..8f07e8fbd03d 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c | |||
@@ -358,7 +358,7 @@ void hfs_bnode_unlink(struct hfs_bnode *node) | |||
358 | 358 | ||
359 | // move down? | 359 | // move down? |
360 | if (!node->prev && !node->next) { | 360 | if (!node->prev && !node->next) { |
361 | printk("hfs_btree_del_level\n"); | 361 | printk(KERN_DEBUG "hfs_btree_del_level\n"); |
362 | } | 362 | } |
363 | if (!node->parent) { | 363 | if (!node->parent) { |
364 | tree->root = 0; | 364 | tree->root = 0; |
@@ -379,7 +379,7 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid) | |||
379 | struct hfs_bnode *node; | 379 | struct hfs_bnode *node; |
380 | 380 | ||
381 | if (cnid >= tree->node_count) { | 381 | if (cnid >= tree->node_count) { |
382 | printk("HFS+-fs: request for non-existent node %d in B*Tree\n", cnid); | 382 | printk(KERN_ERR "hfs: request for non-existent node %d in B*Tree\n", cnid); |
383 | return NULL; | 383 | return NULL; |
384 | } | 384 | } |
385 | 385 | ||
@@ -402,7 +402,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) | |||
402 | loff_t off; | 402 | loff_t off; |
403 | 403 | ||
404 | if (cnid >= tree->node_count) { | 404 | if (cnid >= tree->node_count) { |
405 | printk("HFS+-fs: request for non-existent node %d in B*Tree\n", cnid); | 405 | printk(KERN_ERR "hfs: request for non-existent node %d in B*Tree\n", cnid); |
406 | return NULL; | 406 | return NULL; |
407 | } | 407 | } |
408 | 408 | ||
@@ -576,8 +576,9 @@ struct hfs_bnode *hfs_bnode_create(struct hfs_btree *tree, u32 num) | |||
576 | node = hfs_bnode_findhash(tree, num); | 576 | node = hfs_bnode_findhash(tree, num); |
577 | spin_unlock(&tree->hash_lock); | 577 | spin_unlock(&tree->hash_lock); |
578 | if (node) { | 578 | if (node) { |
579 | printk("new node %u already hashed?\n", num); | 579 | printk(KERN_CRIT "new node %u already hashed?\n", num); |
580 | BUG(); | 580 | WARN_ON(1); |
581 | return node; | ||
581 | } | 582 | } |
582 | node = __hfs_bnode_create(tree, num); | 583 | node = __hfs_bnode_create(tree, num); |
583 | if (!node) | 584 | if (!node) |
diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c index 0ccef2ab790c..c88e5d72a402 100644 --- a/fs/hfsplus/brec.c +++ b/fs/hfsplus/brec.c | |||
@@ -360,7 +360,7 @@ again: | |||
360 | end_off = hfs_bnode_read_u16(parent, end_rec_off); | 360 | end_off = hfs_bnode_read_u16(parent, end_rec_off); |
361 | if (end_rec_off - end_off < diff) { | 361 | if (end_rec_off - end_off < diff) { |
362 | 362 | ||
363 | printk("splitting index node...\n"); | 363 | printk(KERN_DEBUG "hfs: splitting index node...\n"); |
364 | fd->bnode = parent; | 364 | fd->bnode = parent; |
365 | new_node = hfs_bnode_split(fd); | 365 | new_node = hfs_bnode_split(fd); |
366 | if (IS_ERR(new_node)) | 366 | if (IS_ERR(new_node)) |
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c index 44326aa2bd34..671290663838 100644 --- a/fs/hfsplus/btree.c +++ b/fs/hfsplus/btree.c | |||
@@ -39,7 +39,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id) | |||
39 | } else if (id == HFSPLUS_CAT_CNID) { | 39 | } else if (id == HFSPLUS_CAT_CNID) { |
40 | tree->keycmp = hfsplus_cat_cmp_key; | 40 | tree->keycmp = hfsplus_cat_cmp_key; |
41 | } else { | 41 | } else { |
42 | printk("HFS+-fs: unknown B*Tree requested\n"); | 42 | printk(KERN_ERR "hfs: unknown B*Tree requested\n"); |
43 | goto free_tree; | 43 | goto free_tree; |
44 | } | 44 | } |
45 | tree->inode = iget(sb, id); | 45 | tree->inode = iget(sb, id); |
@@ -99,7 +99,7 @@ void hfs_btree_close(struct hfs_btree *tree) | |||
99 | while ((node = tree->node_hash[i])) { | 99 | while ((node = tree->node_hash[i])) { |
100 | tree->node_hash[i] = node->next_hash; | 100 | tree->node_hash[i] = node->next_hash; |
101 | if (atomic_read(&node->refcnt)) | 101 | if (atomic_read(&node->refcnt)) |
102 | printk("HFS+: node %d:%d still has %d user(s)!\n", | 102 | printk(KERN_CRIT "hfs: node %d:%d still has %d user(s)!\n", |
103 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); | 103 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); |
104 | hfs_bnode_free(node); | 104 | hfs_bnode_free(node); |
105 | tree->node_hash_cnt--; | 105 | tree->node_hash_cnt--; |
@@ -223,10 +223,6 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
223 | tree->free_nodes--; | 223 | tree->free_nodes--; |
224 | mark_inode_dirty(tree->inode); | 224 | mark_inode_dirty(tree->inode); |
225 | hfs_bnode_put(node); | 225 | hfs_bnode_put(node); |
226 | if (!idx) { | ||
227 | printk("unexpected idx %u (%u)\n", idx, node->this); | ||
228 | BUG(); | ||
229 | } | ||
230 | return hfs_bnode_create(tree, idx); | 226 | return hfs_bnode_create(tree, idx); |
231 | } | 227 | } |
232 | } | 228 | } |
@@ -242,7 +238,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree) | |||
242 | kunmap(*pagep); | 238 | kunmap(*pagep); |
243 | nidx = node->next; | 239 | nidx = node->next; |
244 | if (!nidx) { | 240 | if (!nidx) { |
245 | printk("create new bmap node...\n"); | 241 | printk(KERN_DEBUG "hfs: create new bmap node...\n"); |
246 | next_node = hfs_bmap_new_bmap(node, idx); | 242 | next_node = hfs_bmap_new_bmap(node, idx); |
247 | } else | 243 | } else |
248 | next_node = hfs_bnode_find(tree, nidx); | 244 | next_node = hfs_bnode_find(tree, nidx); |
@@ -284,7 +280,7 @@ void hfs_bmap_free(struct hfs_bnode *node) | |||
284 | hfs_bnode_put(node); | 280 | hfs_bnode_put(node); |
285 | if (!i) { | 281 | if (!i) { |
286 | /* panic */; | 282 | /* panic */; |
287 | printk("HFS: unable to free bnode %u. bmap not found!\n", node->this); | 283 | printk(KERN_CRIT "hfs: unable to free bnode %u. bmap not found!\n", node->this); |
288 | return; | 284 | return; |
289 | } | 285 | } |
290 | node = hfs_bnode_find(tree, i); | 286 | node = hfs_bnode_find(tree, i); |
@@ -292,7 +288,7 @@ void hfs_bmap_free(struct hfs_bnode *node) | |||
292 | return; | 288 | return; |
293 | if (node->type != HFS_NODE_MAP) { | 289 | if (node->type != HFS_NODE_MAP) { |
294 | /* panic */; | 290 | /* panic */; |
295 | printk("HFS: invalid bmap found! (%u,%d)\n", node->this, node->type); | 291 | printk(KERN_CRIT "hfs: invalid bmap found! (%u,%d)\n", node->this, node->type); |
296 | hfs_bnode_put(node); | 292 | hfs_bnode_put(node); |
297 | return; | 293 | return; |
298 | } | 294 | } |
@@ -305,7 +301,7 @@ void hfs_bmap_free(struct hfs_bnode *node) | |||
305 | m = 1 << (~nidx & 7); | 301 | m = 1 << (~nidx & 7); |
306 | byte = data[off]; | 302 | byte = data[off]; |
307 | if (!(byte & m)) { | 303 | if (!(byte & m)) { |
308 | printk("HFS: trying to free free bnode %u(%d)\n", node->this, node->type); | 304 | printk(KERN_CRIT "hfs: trying to free free bnode %u(%d)\n", node->this, node->type); |
309 | kunmap(page); | 305 | kunmap(page); |
310 | hfs_bnode_put(node); | 306 | hfs_bnode_put(node); |
311 | return; | 307 | return; |
diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c index 94712790c8b3..074451f1d95f 100644 --- a/fs/hfsplus/catalog.c +++ b/fs/hfsplus/catalog.c | |||
@@ -139,7 +139,7 @@ int hfsplus_find_cat(struct super_block *sb, u32 cnid, | |||
139 | 139 | ||
140 | type = be16_to_cpu(tmp.type); | 140 | type = be16_to_cpu(tmp.type); |
141 | if (type != HFSPLUS_FOLDER_THREAD && type != HFSPLUS_FILE_THREAD) { | 141 | if (type != HFSPLUS_FOLDER_THREAD && type != HFSPLUS_FILE_THREAD) { |
142 | printk("HFS+-fs: Found bad thread record in catalog\n"); | 142 | printk(KERN_ERR "hfs: found bad thread record in catalog\n"); |
143 | return -EIO; | 143 | return -EIO; |
144 | } | 144 | } |
145 | 145 | ||
diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index 50c8f44b6c66..82c223765478 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c | |||
@@ -84,7 +84,7 @@ again: | |||
84 | } else if (!dentry->d_fsdata) | 84 | } else if (!dentry->d_fsdata) |
85 | dentry->d_fsdata = (void *)(unsigned long)cnid; | 85 | dentry->d_fsdata = (void *)(unsigned long)cnid; |
86 | } else { | 86 | } else { |
87 | printk("HFS+-fs: Illegal catalog entry type in lookup\n"); | 87 | printk(KERN_ERR "hfs: invalid catalog entry type in lookup\n"); |
88 | err = -EIO; | 88 | err = -EIO; |
89 | goto fail; | 89 | goto fail; |
90 | } | 90 | } |
@@ -132,12 +132,12 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
132 | case 1: | 132 | case 1: |
133 | hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength); | 133 | hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, fd.entrylength); |
134 | if (be16_to_cpu(entry.type) != HFSPLUS_FOLDER_THREAD) { | 134 | if (be16_to_cpu(entry.type) != HFSPLUS_FOLDER_THREAD) { |
135 | printk("HFS+-fs: bad catalog folder thread\n"); | 135 | printk(KERN_ERR "hfs: bad catalog folder thread\n"); |
136 | err = -EIO; | 136 | err = -EIO; |
137 | goto out; | 137 | goto out; |
138 | } | 138 | } |
139 | if (fd.entrylength < HFSPLUS_MIN_THREAD_SZ) { | 139 | if (fd.entrylength < HFSPLUS_MIN_THREAD_SZ) { |
140 | printk("HFS+-fs: truncated catalog thread\n"); | 140 | printk(KERN_ERR "hfs: truncated catalog thread\n"); |
141 | err = -EIO; | 141 | err = -EIO; |
142 | goto out; | 142 | goto out; |
143 | } | 143 | } |
@@ -156,7 +156,7 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
156 | 156 | ||
157 | for (;;) { | 157 | for (;;) { |
158 | if (be32_to_cpu(fd.key->cat.parent) != inode->i_ino) { | 158 | if (be32_to_cpu(fd.key->cat.parent) != inode->i_ino) { |
159 | printk("HFS+-fs: walked past end of dir\n"); | 159 | printk(KERN_ERR "hfs: walked past end of dir\n"); |
160 | err = -EIO; | 160 | err = -EIO; |
161 | goto out; | 161 | goto out; |
162 | } | 162 | } |
@@ -168,7 +168,7 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
168 | goto out; | 168 | goto out; |
169 | if (type == HFSPLUS_FOLDER) { | 169 | if (type == HFSPLUS_FOLDER) { |
170 | if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) { | 170 | if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) { |
171 | printk("HFS+-fs: small dir entry\n"); | 171 | printk(KERN_ERR "hfs: small dir entry\n"); |
172 | err = -EIO; | 172 | err = -EIO; |
173 | goto out; | 173 | goto out; |
174 | } | 174 | } |
@@ -180,7 +180,7 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
180 | break; | 180 | break; |
181 | } else if (type == HFSPLUS_FILE) { | 181 | } else if (type == HFSPLUS_FILE) { |
182 | if (fd.entrylength < sizeof(struct hfsplus_cat_file)) { | 182 | if (fd.entrylength < sizeof(struct hfsplus_cat_file)) { |
183 | printk("HFS+-fs: small file entry\n"); | 183 | printk(KERN_ERR "hfs: small file entry\n"); |
184 | err = -EIO; | 184 | err = -EIO; |
185 | goto out; | 185 | goto out; |
186 | } | 186 | } |
@@ -188,7 +188,7 @@ static int hfsplus_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
188 | be32_to_cpu(entry.file.id), DT_REG)) | 188 | be32_to_cpu(entry.file.id), DT_REG)) |
189 | break; | 189 | break; |
190 | } else { | 190 | } else { |
191 | printk("HFS+-fs: bad catalog entry type\n"); | 191 | printk(KERN_ERR "hfs: bad catalog entry type\n"); |
192 | err = -EIO; | 192 | err = -EIO; |
193 | goto out; | 193 | goto out; |
194 | } | 194 | } |
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index e3ff56a03011..c95559f69bcb 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c | |||
@@ -349,10 +349,9 @@ int hfsplus_file_extend(struct inode *inode) | |||
349 | 349 | ||
350 | if (HFSPLUS_SB(sb).alloc_file->i_size * 8 < HFSPLUS_SB(sb).total_blocks - HFSPLUS_SB(sb).free_blocks + 8) { | 350 | if (HFSPLUS_SB(sb).alloc_file->i_size * 8 < HFSPLUS_SB(sb).total_blocks - HFSPLUS_SB(sb).free_blocks + 8) { |
351 | // extend alloc file | 351 | // extend alloc file |
352 | printk("extend alloc file! (%Lu,%u,%u)\n", HFSPLUS_SB(sb).alloc_file->i_size * 8, | 352 | printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n", HFSPLUS_SB(sb).alloc_file->i_size * 8, |
353 | HFSPLUS_SB(sb).total_blocks, HFSPLUS_SB(sb).free_blocks); | 353 | HFSPLUS_SB(sb).total_blocks, HFSPLUS_SB(sb).free_blocks); |
354 | return -ENOSPC; | 354 | return -ENOSPC; |
355 | //BUG(); | ||
356 | } | 355 | } |
357 | 356 | ||
358 | down(&HFSPLUS_I(inode).extents_lock); | 357 | down(&HFSPLUS_I(inode).extents_lock); |
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 7acff6c5464f..182eb3177975 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -18,13 +18,11 @@ | |||
18 | 18 | ||
19 | static int hfsplus_readpage(struct file *file, struct page *page) | 19 | static int hfsplus_readpage(struct file *file, struct page *page) |
20 | { | 20 | { |
21 | //printk("readpage: %lu\n", page->index); | ||
22 | return block_read_full_page(page, hfsplus_get_block); | 21 | return block_read_full_page(page, hfsplus_get_block); |
23 | } | 22 | } |
24 | 23 | ||
25 | static int hfsplus_writepage(struct page *page, struct writeback_control *wbc) | 24 | static int hfsplus_writepage(struct page *page, struct writeback_control *wbc) |
26 | { | 25 | { |
27 | //printk("writepage: %lu\n", page->index); | ||
28 | return block_write_full_page(page, hfsplus_get_block, wbc); | 26 | return block_write_full_page(page, hfsplus_get_block, wbc); |
29 | } | 27 | } |
30 | 28 | ||
@@ -92,7 +90,6 @@ static int hfsplus_releasepage(struct page *page, gfp_t mask) | |||
92 | } while (--i && nidx < tree->node_count); | 90 | } while (--i && nidx < tree->node_count); |
93 | spin_unlock(&tree->hash_lock); | 91 | spin_unlock(&tree->hash_lock); |
94 | } | 92 | } |
95 | //printk("releasepage: %lu,%x = %d\n", page->index, mask, res); | ||
96 | return res ? try_to_free_buffers(page) : 0; | 93 | return res ? try_to_free_buffers(page) : 0; |
97 | } | 94 | } |
98 | 95 | ||
@@ -467,7 +464,7 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) | |||
467 | inode->i_mtime = hfsp_mt2ut(file->content_mod_date); | 464 | inode->i_mtime = hfsp_mt2ut(file->content_mod_date); |
468 | inode->i_ctime = inode->i_mtime; | 465 | inode->i_ctime = inode->i_mtime; |
469 | } else { | 466 | } else { |
470 | printk("HFS+-fs: bad catalog entry used to create inode\n"); | 467 | printk(KERN_ERR "hfs: bad catalog entry used to create inode\n"); |
471 | res = -EIO; | 468 | res = -EIO; |
472 | } | 469 | } |
473 | return res; | 470 | return res; |
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index 935dafba0078..dc64fac00831 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c | |||
@@ -83,58 +83,58 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) | |||
83 | switch (token) { | 83 | switch (token) { |
84 | case opt_creator: | 84 | case opt_creator: |
85 | if (match_fourchar(&args[0], &sbi->creator)) { | 85 | if (match_fourchar(&args[0], &sbi->creator)) { |
86 | printk("HFS+-fs: creator requires a 4 character value\n"); | 86 | printk(KERN_ERR "hfs: creator requires a 4 character value\n"); |
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | break; | 89 | break; |
90 | case opt_type: | 90 | case opt_type: |
91 | if (match_fourchar(&args[0], &sbi->type)) { | 91 | if (match_fourchar(&args[0], &sbi->type)) { |
92 | printk("HFS+-fs: type requires a 4 character value\n"); | 92 | printk(KERN_ERR "hfs: type requires a 4 character value\n"); |
93 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | break; | 95 | break; |
96 | case opt_umask: | 96 | case opt_umask: |
97 | if (match_octal(&args[0], &tmp)) { | 97 | if (match_octal(&args[0], &tmp)) { |
98 | printk("HFS+-fs: umask requires a value\n"); | 98 | printk(KERN_ERR "hfs: umask requires a value\n"); |
99 | return 0; | 99 | return 0; |
100 | } | 100 | } |
101 | sbi->umask = (umode_t)tmp; | 101 | sbi->umask = (umode_t)tmp; |
102 | break; | 102 | break; |
103 | case opt_uid: | 103 | case opt_uid: |
104 | if (match_int(&args[0], &tmp)) { | 104 | if (match_int(&args[0], &tmp)) { |
105 | printk("HFS+-fs: uid requires an argument\n"); | 105 | printk(KERN_ERR "hfs: uid requires an argument\n"); |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | sbi->uid = (uid_t)tmp; | 108 | sbi->uid = (uid_t)tmp; |
109 | break; | 109 | break; |
110 | case opt_gid: | 110 | case opt_gid: |
111 | if (match_int(&args[0], &tmp)) { | 111 | if (match_int(&args[0], &tmp)) { |
112 | printk("HFS+-fs: gid requires an argument\n"); | 112 | printk(KERN_ERR "hfs: gid requires an argument\n"); |
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | sbi->gid = (gid_t)tmp; | 115 | sbi->gid = (gid_t)tmp; |
116 | break; | 116 | break; |
117 | case opt_part: | 117 | case opt_part: |
118 | if (match_int(&args[0], &sbi->part)) { | 118 | if (match_int(&args[0], &sbi->part)) { |
119 | printk("HFS+-fs: part requires an argument\n"); | 119 | printk(KERN_ERR "hfs: part requires an argument\n"); |
120 | return 0; | 120 | return 0; |
121 | } | 121 | } |
122 | break; | 122 | break; |
123 | case opt_session: | 123 | case opt_session: |
124 | if (match_int(&args[0], &sbi->session)) { | 124 | if (match_int(&args[0], &sbi->session)) { |
125 | printk("HFS+-fs: session requires an argument\n"); | 125 | printk(KERN_ERR "hfs: session requires an argument\n"); |
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | break; | 128 | break; |
129 | case opt_nls: | 129 | case opt_nls: |
130 | if (sbi->nls) { | 130 | if (sbi->nls) { |
131 | printk("HFS+-fs: unable to change nls mapping\n"); | 131 | printk(KERN_ERR "hfs: unable to change nls mapping\n"); |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | p = match_strdup(&args[0]); | 134 | p = match_strdup(&args[0]); |
135 | sbi->nls = load_nls(p); | 135 | sbi->nls = load_nls(p); |
136 | if (!sbi->nls) { | 136 | if (!sbi->nls) { |
137 | printk("HFS+-fs: unable to load nls mapping \"%s\"\n", p); | 137 | printk(KERN_ERR "hfs: unable to load nls mapping \"%s\"\n", p); |
138 | kfree(p); | 138 | kfree(p); |
139 | return 0; | 139 | return 0; |
140 | } | 140 | } |
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index d791780def50..b712d34d458d 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c | |||
@@ -169,7 +169,7 @@ static void hfsplus_write_super(struct super_block *sb) | |||
169 | block = HFSPLUS_SB(sb).blockoffset; | 169 | block = HFSPLUS_SB(sb).blockoffset; |
170 | block += (HFSPLUS_SB(sb).sect_count - 2) >> (sb->s_blocksize_bits - 9); | 170 | block += (HFSPLUS_SB(sb).sect_count - 2) >> (sb->s_blocksize_bits - 9); |
171 | offset = ((HFSPLUS_SB(sb).sect_count - 2) << 9) & (sb->s_blocksize - 1); | 171 | offset = ((HFSPLUS_SB(sb).sect_count - 2) << 9) & (sb->s_blocksize - 1); |
172 | printk("backup: %u,%u,%u,%u\n", HFSPLUS_SB(sb).blockoffset, | 172 | printk(KERN_DEBUG "hfs: backup: %u,%u,%u,%u\n", HFSPLUS_SB(sb).blockoffset, |
173 | HFSPLUS_SB(sb).sect_count, block, offset); | 173 | HFSPLUS_SB(sb).sect_count, block, offset); |
174 | bh = sb_bread(sb, block); | 174 | bh = sb_bread(sb, block); |
175 | if (bh) { | 175 | if (bh) { |
@@ -179,7 +179,7 @@ static void hfsplus_write_super(struct super_block *sb) | |||
179 | mark_buffer_dirty(bh); | 179 | mark_buffer_dirty(bh); |
180 | brelse(bh); | 180 | brelse(bh); |
181 | } else | 181 | } else |
182 | printk("backup not found!\n"); | 182 | printk(KERN_WARNING "hfs: backup not found!\n"); |
183 | } | 183 | } |
184 | } | 184 | } |
185 | HFSPLUS_SB(sb).flags &= ~HFSPLUS_SB_WRITEBACKUP; | 185 | HFSPLUS_SB(sb).flags &= ~HFSPLUS_SB_WRITEBACKUP; |
@@ -240,18 +240,18 @@ static int hfsplus_remount(struct super_block *sb, int *flags, char *data) | |||
240 | return -EINVAL; | 240 | return -EINVAL; |
241 | 241 | ||
242 | if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { | 242 | if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { |
243 | printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " | 243 | printk(KERN_WARNING "hfs: filesystem was not cleanly unmounted, " |
244 | "running fsck.hfsplus is recommended. leaving read-only.\n"); | 244 | "running fsck.hfsplus is recommended. leaving read-only.\n"); |
245 | sb->s_flags |= MS_RDONLY; | 245 | sb->s_flags |= MS_RDONLY; |
246 | *flags |= MS_RDONLY; | 246 | *flags |= MS_RDONLY; |
247 | } else if (sbi.flags & HFSPLUS_SB_FORCE) { | 247 | } else if (sbi.flags & HFSPLUS_SB_FORCE) { |
248 | /* nothing */ | 248 | /* nothing */ |
249 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { | 249 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { |
250 | printk("HFS+-fs: Filesystem is marked locked, leaving read-only.\n"); | 250 | printk(KERN_WARNING "hfs: filesystem is marked locked, leaving read-only.\n"); |
251 | sb->s_flags |= MS_RDONLY; | 251 | sb->s_flags |= MS_RDONLY; |
252 | *flags |= MS_RDONLY; | 252 | *flags |= MS_RDONLY; |
253 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { | 253 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { |
254 | printk("HFS+-fs: Filesystem is marked journaled, leaving read-only.\n"); | 254 | printk(KERN_WARNING "hfs: filesystem is marked journaled, leaving read-only.\n"); |
255 | sb->s_flags |= MS_RDONLY; | 255 | sb->s_flags |= MS_RDONLY; |
256 | *flags |= MS_RDONLY; | 256 | *flags |= MS_RDONLY; |
257 | } | 257 | } |
@@ -292,8 +292,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
292 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); | 292 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); |
293 | hfsplus_fill_defaults(sbi); | 293 | hfsplus_fill_defaults(sbi); |
294 | if (!hfsplus_parse_options(data, sbi)) { | 294 | if (!hfsplus_parse_options(data, sbi)) { |
295 | if (!silent) | 295 | printk(KERN_ERR "hfs: unable to parse mount options\n"); |
296 | printk("HFS+-fs: unable to parse mount options\n"); | ||
297 | err = -EINVAL; | 296 | err = -EINVAL; |
298 | goto cleanup; | 297 | goto cleanup; |
299 | } | 298 | } |
@@ -302,7 +301,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
302 | nls = sbi->nls; | 301 | nls = sbi->nls; |
303 | sbi->nls = load_nls("utf8"); | 302 | sbi->nls = load_nls("utf8"); |
304 | if (!sbi->nls) { | 303 | if (!sbi->nls) { |
305 | printk("HFS+: unable to load nls for utf8\n"); | 304 | printk(KERN_ERR "hfs: unable to load nls for utf8\n"); |
306 | err = -EINVAL; | 305 | err = -EINVAL; |
307 | goto cleanup; | 306 | goto cleanup; |
308 | } | 307 | } |
@@ -310,7 +309,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
310 | /* Grab the volume header */ | 309 | /* Grab the volume header */ |
311 | if (hfsplus_read_wrapper(sb)) { | 310 | if (hfsplus_read_wrapper(sb)) { |
312 | if (!silent) | 311 | if (!silent) |
313 | printk("HFS+-fs: unable to find HFS+ superblock\n"); | 312 | printk(KERN_WARNING "hfs: unable to find HFS+ superblock\n"); |
314 | err = -EINVAL; | 313 | err = -EINVAL; |
315 | goto cleanup; | 314 | goto cleanup; |
316 | } | 315 | } |
@@ -319,8 +318,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
319 | /* Copy parts of the volume header into the superblock */ | 318 | /* Copy parts of the volume header into the superblock */ |
320 | sb->s_magic = be16_to_cpu(vhdr->signature); | 319 | sb->s_magic = be16_to_cpu(vhdr->signature); |
321 | if (be16_to_cpu(vhdr->version) != HFSPLUS_CURRENT_VERSION) { | 320 | if (be16_to_cpu(vhdr->version) != HFSPLUS_CURRENT_VERSION) { |
322 | if (!silent) | 321 | printk(KERN_ERR "hfs: wrong filesystem version\n"); |
323 | printk("HFS+-fs: wrong filesystem version\n"); | ||
324 | goto cleanup; | 322 | goto cleanup; |
325 | } | 323 | } |
326 | HFSPLUS_SB(sb).total_blocks = be32_to_cpu(vhdr->total_blocks); | 324 | HFSPLUS_SB(sb).total_blocks = be32_to_cpu(vhdr->total_blocks); |
@@ -341,20 +339,17 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
341 | sb->s_maxbytes = MAX_LFS_FILESIZE; | 339 | sb->s_maxbytes = MAX_LFS_FILESIZE; |
342 | 340 | ||
343 | if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { | 341 | if (!(vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_UNMNT))) { |
344 | if (!silent) | 342 | printk(KERN_WARNING "hfs: Filesystem was not cleanly unmounted, " |
345 | printk("HFS+-fs warning: Filesystem was not cleanly unmounted, " | 343 | "running fsck.hfsplus is recommended. mounting read-only.\n"); |
346 | "running fsck.hfsplus is recommended. mounting read-only.\n"); | ||
347 | sb->s_flags |= MS_RDONLY; | 344 | sb->s_flags |= MS_RDONLY; |
348 | } else if (sbi->flags & HFSPLUS_SB_FORCE) { | 345 | } else if (sbi->flags & HFSPLUS_SB_FORCE) { |
349 | /* nothing */ | 346 | /* nothing */ |
350 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { | 347 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_SOFTLOCK)) { |
351 | if (!silent) | 348 | printk(KERN_WARNING "hfs: Filesystem is marked locked, mounting read-only.\n"); |
352 | printk("HFS+-fs: Filesystem is marked locked, mounting read-only.\n"); | ||
353 | sb->s_flags |= MS_RDONLY; | 349 | sb->s_flags |= MS_RDONLY; |
354 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { | 350 | } else if (vhdr->attributes & cpu_to_be32(HFSPLUS_VOL_JOURNALED)) { |
355 | if (!silent) | 351 | printk(KERN_WARNING "hfs: write access to a jounaled filesystem is not supported, " |
356 | printk("HFS+-fs: write access to a jounaled filesystem is not supported, " | 352 | "use the force option at your own risk, mounting read-only.\n"); |
357 | "use the force option at your own risk, mounting read-only.\n"); | ||
358 | sb->s_flags |= MS_RDONLY; | 353 | sb->s_flags |= MS_RDONLY; |
359 | } | 354 | } |
360 | sbi->flags &= ~HFSPLUS_SB_FORCE; | 355 | sbi->flags &= ~HFSPLUS_SB_FORCE; |
@@ -362,21 +357,18 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
362 | /* Load metadata objects (B*Trees) */ | 357 | /* Load metadata objects (B*Trees) */ |
363 | HFSPLUS_SB(sb).ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); | 358 | HFSPLUS_SB(sb).ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); |
364 | if (!HFSPLUS_SB(sb).ext_tree) { | 359 | if (!HFSPLUS_SB(sb).ext_tree) { |
365 | if (!silent) | 360 | printk(KERN_ERR "hfs: failed to load extents file\n"); |
366 | printk("HFS+-fs: failed to load extents file\n"); | ||
367 | goto cleanup; | 361 | goto cleanup; |
368 | } | 362 | } |
369 | HFSPLUS_SB(sb).cat_tree = hfs_btree_open(sb, HFSPLUS_CAT_CNID); | 363 | HFSPLUS_SB(sb).cat_tree = hfs_btree_open(sb, HFSPLUS_CAT_CNID); |
370 | if (!HFSPLUS_SB(sb).cat_tree) { | 364 | if (!HFSPLUS_SB(sb).cat_tree) { |
371 | if (!silent) | 365 | printk(KERN_ERR "hfs: failed to load catalog file\n"); |
372 | printk("HFS+-fs: failed to load catalog file\n"); | ||
373 | goto cleanup; | 366 | goto cleanup; |
374 | } | 367 | } |
375 | 368 | ||
376 | HFSPLUS_SB(sb).alloc_file = iget(sb, HFSPLUS_ALLOC_CNID); | 369 | HFSPLUS_SB(sb).alloc_file = iget(sb, HFSPLUS_ALLOC_CNID); |
377 | if (!HFSPLUS_SB(sb).alloc_file) { | 370 | if (!HFSPLUS_SB(sb).alloc_file) { |
378 | if (!silent) | 371 | printk(KERN_ERR "hfs: failed to load allocation file\n"); |
379 | printk("HFS+-fs: failed to load allocation file\n"); | ||
380 | goto cleanup; | 372 | goto cleanup; |
381 | } | 373 | } |
382 | 374 | ||
@@ -384,8 +376,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
384 | root = iget(sb, HFSPLUS_ROOT_CNID); | 376 | root = iget(sb, HFSPLUS_ROOT_CNID); |
385 | sb->s_root = d_alloc_root(root); | 377 | sb->s_root = d_alloc_root(root); |
386 | if (!sb->s_root) { | 378 | if (!sb->s_root) { |
387 | if (!silent) | 379 | printk(KERN_ERR "hfs: failed to load root directory\n"); |
388 | printk("HFS+-fs: failed to load root directory\n"); | ||
389 | iput(root); | 380 | iput(root); |
390 | goto cleanup; | 381 | goto cleanup; |
391 | } | 382 | } |
@@ -419,7 +410,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) | |||
419 | sync_dirty_buffer(HFSPLUS_SB(sb).s_vhbh); | 410 | sync_dirty_buffer(HFSPLUS_SB(sb).s_vhbh); |
420 | 411 | ||
421 | if (!HFSPLUS_SB(sb).hidden_dir) { | 412 | if (!HFSPLUS_SB(sb).hidden_dir) { |
422 | printk("HFS+: create hidden dir...\n"); | 413 | printk(KERN_DEBUG "hfs: create hidden dir...\n"); |
423 | HFSPLUS_SB(sb).hidden_dir = hfsplus_new_inode(sb, S_IFDIR); | 414 | HFSPLUS_SB(sb).hidden_dir = hfsplus_new_inode(sb, S_IFDIR); |
424 | hfsplus_create_cat(HFSPLUS_SB(sb).hidden_dir->i_ino, sb->s_root->d_inode, | 415 | hfsplus_create_cat(HFSPLUS_SB(sb).hidden_dir->i_ino, sb->s_root->d_inode, |
425 | &str, HFSPLUS_SB(sb).hidden_dir); | 416 | &str, HFSPLUS_SB(sb).hidden_dir); |
@@ -499,7 +490,7 @@ static void __exit exit_hfsplus_fs(void) | |||
499 | { | 490 | { |
500 | unregister_filesystem(&hfsplus_fs_type); | 491 | unregister_filesystem(&hfsplus_fs_type); |
501 | if (kmem_cache_destroy(hfsplus_inode_cachep)) | 492 | if (kmem_cache_destroy(hfsplus_inode_cachep)) |
502 | printk(KERN_INFO "hfsplus_inode_cache: not all structures were freed\n"); | 493 | printk(KERN_ERR "hfsplus_inode_cache: not all structures were freed\n"); |
503 | } | 494 | } |
504 | 495 | ||
505 | module_init(init_hfsplus_fs) | 496 | module_init(init_hfsplus_fs) |
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 95455e839231..6b2dc3a061a8 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c | |||
@@ -70,7 +70,7 @@ static int hfsplus_get_last_session(struct super_block *sb, | |||
70 | *start = (sector_t)te.cdte_addr.lba << 2; | 70 | *start = (sector_t)te.cdte_addr.lba << 2; |
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | printk(KERN_ERR "HFS: Invalid session number or type of track\n"); | 73 | printk(KERN_ERR "hfs: invalid session number or type of track\n"); |
74 | return -EINVAL; | 74 | return -EINVAL; |
75 | } | 75 | } |
76 | ms_info.addr_format = CDROM_LBA; | 76 | ms_info.addr_format = CDROM_LBA; |
@@ -143,7 +143,7 @@ int hfsplus_read_wrapper(struct super_block *sb) | |||
143 | blocksize >>= 1; | 143 | blocksize >>= 1; |
144 | 144 | ||
145 | if (sb_set_blocksize(sb, blocksize) != blocksize) { | 145 | if (sb_set_blocksize(sb, blocksize) != blocksize) { |
146 | printk("HFS+: unable to blocksize to %u!\n", blocksize); | 146 | printk(KERN_ERR "hfs: unable to set blocksize to %u!\n", blocksize); |
147 | return -EINVAL; | 147 | return -EINVAL; |
148 | } | 148 | } |
149 | 149 | ||