aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/tnc_misc.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-01-13 05:33:53 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-01-13 05:50:42 -0500
commit515315a123af641a9533e4ff0f178c470dc08fc7 (patch)
tree1a215c3df46286d7ff878cd86517818404758900 /fs/ubifs/tnc_misc.c
parentbeba006074e7170d3bc91470c8a6c914730d4c63 (diff)
UBIFS: fix key printing
Before commit 56e46742e846e4de167dde0e1e1071ace1c882a5 we have had locking around all printing macros and we could use static buffers for creating key strings and printing them. However, now we do not have that locking and we cannot use static buffers. This commit removes the old DBGKEY() macros and introduces few new helper macros for printing debugging messages plus a key at the end. Thankfully, all the messages are already structures in a way that the key is printed in the end. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs/tnc_misc.c')
-rw-r--r--fs/ubifs/tnc_misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c
index b48db999903e..dc28fe6ec07a 100644
--- a/fs/ubifs/tnc_misc.c
+++ b/fs/ubifs/tnc_misc.c
@@ -328,8 +328,8 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len,
328 case UBIFS_XENT_KEY: 328 case UBIFS_XENT_KEY:
329 break; 329 break;
330 default: 330 default:
331 dbg_msg("bad key type at slot %d: %s", i, 331 dbg_msg("bad key type at slot %d: %d",
332 DBGKEY(&zbr->key)); 332 i, key_type(c, &zbr->key));
333 err = 3; 333 err = 3;
334 goto out_dump; 334 goto out_dump;
335 } 335 }
@@ -475,7 +475,7 @@ int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
475 zbr->offs); 475 zbr->offs);
476 476
477 if (err) { 477 if (err) {
478 dbg_tnc("key %s", DBGKEY(key)); 478 dbg_tnck(key, "key ");
479 return err; 479 return err;
480 } 480 }
481 481
@@ -484,8 +484,8 @@ int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
484 if (!keys_eq(c, key, &key1)) { 484 if (!keys_eq(c, key, &key1)) {
485 ubifs_err("bad key in node at LEB %d:%d", 485 ubifs_err("bad key in node at LEB %d:%d",
486 zbr->lnum, zbr->offs); 486 zbr->lnum, zbr->offs);
487 dbg_tnc("looked for key %s found node's key %s", 487 dbg_tnck(key, "looked for key ");
488 DBGKEY(key), DBGKEY1(&key1)); 488 dbg_tnck(&key1, "but found node's key ");
489 dbg_dump_node(c, node); 489 dbg_dump_node(c, node);
490 return -EINVAL; 490 return -EINVAL;
491 } 491 }