UBIFS: separate debugging fields out

Introduce a new data structure which contains all debugging
stuff inside. This is cleaner than having debugging stuff
directly in 'c'.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
Artem Bityutskiy
2008-10-17 13:31:39 +03:00
parent 5dd7cbc083
commit 17c2f9f85c
9 changed files with 156 additions and 113 deletions

View File

@@ -553,8 +553,8 @@ static int layout_in_empty_space(struct ubifs_info *c)
}
#ifdef CONFIG_UBIFS_FS_DEBUG
c->new_ihead_lnum = lnum;
c->new_ihead_offs = buf_offs;
c->dbg->new_ihead_lnum = lnum;
c->dbg->new_ihead_offs = buf_offs;
#endif
return 0;
@@ -1002,7 +1002,8 @@ static int write_index(struct ubifs_info *c)
}
#ifdef CONFIG_UBIFS_FS_DEBUG
if (lnum != c->new_ihead_lnum || buf_offs != c->new_ihead_offs) {
if (lnum != c->dbg->new_ihead_lnum ||
buf_offs != c->dbg->new_ihead_offs) {
ubifs_err("inconsistent ihead");
return -EINVAL;
}