UBIFS: get rid of dbg_err
This patch removes the 'dbg_err()' macro and we now use 'ubifs_err()' instead. The idea of 'dbg_err()' was to compile out some error message to make the binary a bit smaller - but I think it was a bad idea. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
@ -293,10 +293,10 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len,
|
||||
lnum, offs, znode->level, znode->child_cnt);
|
||||
|
||||
if (znode->child_cnt > c->fanout || znode->level > UBIFS_MAX_LEVELS) {
|
||||
dbg_err("current fanout %d, branch count %d",
|
||||
c->fanout, znode->child_cnt);
|
||||
dbg_err("max levels %d, znode level %d",
|
||||
UBIFS_MAX_LEVELS, znode->level);
|
||||
ubifs_err("current fanout %d, branch count %d",
|
||||
c->fanout, znode->child_cnt);
|
||||
ubifs_err("max levels %d, znode level %d",
|
||||
UBIFS_MAX_LEVELS, znode->level);
|
||||
err = 1;
|
||||
goto out_dump;
|
||||
}
|
||||
@ -316,7 +316,7 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len,
|
||||
if (zbr->lnum < c->main_first ||
|
||||
zbr->lnum >= c->leb_cnt || zbr->offs < 0 ||
|
||||
zbr->offs + zbr->len > c->leb_size || zbr->offs & 7) {
|
||||
dbg_err("bad branch %d", i);
|
||||
ubifs_err("bad branch %d", i);
|
||||
err = 2;
|
||||
goto out_dump;
|
||||
}
|
||||
@ -340,19 +340,19 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len,
|
||||
type = key_type(c, &zbr->key);
|
||||
if (c->ranges[type].max_len == 0) {
|
||||
if (zbr->len != c->ranges[type].len) {
|
||||
dbg_err("bad target node (type %d) length (%d)",
|
||||
type, zbr->len);
|
||||
dbg_err("have to be %d", c->ranges[type].len);
|
||||
ubifs_err("bad target node (type %d) length (%d)",
|
||||
type, zbr->len);
|
||||
ubifs_err("have to be %d", c->ranges[type].len);
|
||||
err = 4;
|
||||
goto out_dump;
|
||||
}
|
||||
} else if (zbr->len < c->ranges[type].min_len ||
|
||||
zbr->len > c->ranges[type].max_len) {
|
||||
dbg_err("bad target node (type %d) length (%d)",
|
||||
type, zbr->len);
|
||||
dbg_err("have to be in range of %d-%d",
|
||||
c->ranges[type].min_len,
|
||||
c->ranges[type].max_len);
|
||||
ubifs_err("bad target node (type %d) length (%d)",
|
||||
type, zbr->len);
|
||||
ubifs_err("have to be in range of %d-%d",
|
||||
c->ranges[type].min_len,
|
||||
c->ranges[type].max_len);
|
||||
err = 5;
|
||||
goto out_dump;
|
||||
}
|
||||
@ -370,13 +370,13 @@ static int read_znode(struct ubifs_info *c, int lnum, int offs, int len,
|
||||
|
||||
cmp = keys_cmp(c, key1, key2);
|
||||
if (cmp > 0) {
|
||||
dbg_err("bad key order (keys %d and %d)", i, i + 1);
|
||||
ubifs_err("bad key order (keys %d and %d)", i, i + 1);
|
||||
err = 6;
|
||||
goto out_dump;
|
||||
} else if (cmp == 0 && !is_hash_key(c, key1)) {
|
||||
/* These can only be keys with colliding hash */
|
||||
dbg_err("keys %d and %d are not hashed but equivalent",
|
||||
i, i + 1);
|
||||
ubifs_err("keys %d and %d are not hashed but equivalent",
|
||||
i, i + 1);
|
||||
err = 7;
|
||||
goto out_dump;
|
||||
}
|
||||
|
Reference in New Issue
Block a user