aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/fsck.ubifs/check_files.c
diff options
context:
space:
mode:
Diffstat (limited to 'ubifs-utils/fsck.ubifs/check_files.c')
-rw-r--r--ubifs-utils/fsck.ubifs/check_files.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/ubifs-utils/fsck.ubifs/check_files.c b/ubifs-utils/fsck.ubifs/check_files.c
index 1e1a77b..615f6bc 100644
--- a/ubifs-utils/fsck.ubifs/check_files.c
+++ b/ubifs-utils/fsck.ubifs/check_files.c
@@ -57,12 +57,13 @@ static int construct_file(struct ubifs_info *c, union ubifs_key *key,
struct rb_root *tree = &FSCK(c)->scanned_files;
struct scanned_node *sn = NULL;
struct ubifs_ch *ch = (struct ubifs_ch *)node;
+ struct scanned_ino_node ino_node;
+ struct scanned_dent_node dent_node;
+ struct scanned_data_node data_node;
switch (ch->node_type) {
case UBIFS_INO_NODE:
{
- struct scanned_ino_node ino_node;
-
if (!parse_ino_node(c, lnum, offs, node, key, &ino_node)) {
if (fix_problem(c, INVALID_INO_NODE, NULL))
return add_invalid_node(c, key, lnum, offs, iter);
@@ -74,8 +75,6 @@ static int construct_file(struct ubifs_info *c, union ubifs_key *key,
case UBIFS_DENT_NODE:
case UBIFS_XENT_NODE:
{
- struct scanned_dent_node dent_node;
-
if (!parse_dent_node(c, lnum, offs, node, key, &dent_node)) {
if (fix_problem(c, INVALID_DENT_NODE, NULL))
return add_invalid_node(c, key, lnum, offs, iter);
@@ -86,8 +85,6 @@ static int construct_file(struct ubifs_info *c, union ubifs_key *key,
}
case UBIFS_DATA_NODE:
{
- struct scanned_data_node data_node;
-
if (!parse_data_node(c, lnum, offs, node, key, &data_node)) {
if (fix_problem(c, INVALID_DATA_NODE, NULL))
return add_invalid_node(c, key, lnum, offs, iter);
@@ -101,8 +98,8 @@ static int construct_file(struct ubifs_info *c, union ubifs_key *key,
}
dbg_fsck("construct file(%lu) for %s node, TNC location %d:%d, in %s",
- inum, ubifs_get_key_name(key_type(c, key)), sn->lnum, sn->offs,
- c->dev_name);
+ (unsigned long)inum, ubifs_get_key_name(key_type(c, key)),
+ sn->lnum, sn->offs, c->dev_name);
return insert_or_update_file(c, tree, sn, key_type(c, key), inum);
}
@@ -344,7 +341,8 @@ void update_files_size(struct ubifs_info *c)
if (file && file->ino.header.exist &&
file->ino.size < e->d_size) {
dbg_fsck("update file(%lu) size %llu->%llu, in %s",
- e->inum, file->ino.size,
+ (unsigned long)e->inum,
+ file->ino.size,
(unsigned long long)e->d_size,
c->dev_name);
file->ino.size = e->d_size;