Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ int __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd)
		else
			e = rec - 1;
	} while (b <= e);
	//printk("%d: %d,%d,%d\n", bnode->this, b, e, rec);
	if (rec != e && e >= 0) {
		len = hfs_brec_lenoff(bnode, e, &off);
		keylen = hfs_brec_keylen(bnode, e);
@@ -127,7 +126,7 @@ int hfs_brec_find(struct hfs_find_data *fd)
	return res;

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);
	res = -EIO;
release:
+3 −3
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ void hfs_bnode_unlink(struct hfs_bnode *node)

	// move down?
	if (!node->prev && !node->next) {
		printk("hfs_btree_del_level\n");
		printk(KERN_DEBUG "hfs_btree_del_level\n");
	}
	if (!node->parent) {
		tree->root = 0;
@@ -219,7 +219,7 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
	struct hfs_bnode *node;

	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;
	}

@@ -242,7 +242,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
	loff_t off;

	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;
	}

+1 −1
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ static int hfs_brec_update_parent(struct hfs_find_data *fd)
		end_off = hfs_bnode_read_u16(parent, end_rec_off);
		if (end_rec_off - end_off < diff) {

			printk("splitting index node...\n");
			printk(KERN_DEBUG "hfs: splitting index node...\n");
			fd->bnode = parent;
			new_node = hfs_bnode_split(fd);
			if (IS_ERR(new_node))
+5 −5
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ void hfs_btree_close(struct hfs_btree *tree)
		while ((node = tree->node_hash[i])) {
			tree->node_hash[i] = node->next_hash;
			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));
			hfs_bnode_free(node);
			tree->node_hash_cnt--;
@@ -252,7 +252,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
		kunmap(*pagep);
		nidx = node->next;
		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);
		} else
			next_node = hfs_bnode_find(tree, nidx);
@@ -292,7 +292,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
		hfs_bnode_put(node);
		if (!i) {
			/* 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;
		}
		node = hfs_bnode_find(tree, i);
@@ -300,7 +300,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
			return;
		if (node->type != HFS_NODE_MAP) {
			/* 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);
			return;
		}
@@ -313,7 +313,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
	m = 1 << (~nidx & 7);
	byte = data[off];
	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);
		hfs_bnode_put(node);
		return;
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ int hfs_cat_find_brec(struct super_block *sb, u32 cnid,

	type = rec.type;
	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;
	}

Loading