diff options
Diffstat (limited to 'e2fsprogs/old_e2fsprogs/e2fsck.c')
-rw-r--r-- | e2fsprogs/old_e2fsprogs/e2fsck.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index 4c4c78d..f58fe92 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c @@ -517,7 +517,6 @@ static void dict_insert(dict_t *dict, dnode_t *node, const void *key) } dict_root(dict)->color = dnode_black; - } /* @@ -801,7 +800,6 @@ static void e2fsck_add_dx_dir(e2fsck_t ctx, ext2_ino_t ino, int num_blocks) dir->dx_block = e2fsck_allocate_memory(ctx, num_blocks * sizeof (struct dx_dirblock_info), "dx_block info array"); - } /* @@ -1724,7 +1722,6 @@ errout: ext2fs_free_mem(&j_inode); ext2fs_free_mem(&journal); return retval; - } static errcode_t e2fsck_journal_fix_bad_inode(e2fsck_t ctx, @@ -3375,7 +3372,6 @@ static void e2fsck_pass1(e2fsck_t ctx) e2fsck_write_inode(ctx, ino, inode, "pass1"); } - } /* * If dtime is set, offer to clear it. mke2fs @@ -3678,7 +3674,6 @@ endit: ext2fs_free_mem(&block_buf); ext2fs_free_mem(&inode); - } /* @@ -4451,8 +4446,7 @@ static void mark_table_blocks(e2fsck_t ctx) ctx->invalid_bitmaps++; } } else { - ext2fs_mark_block_bitmap(ctx->block_found_map, - b); + ext2fs_mark_block_bitmap(ctx->block_found_map, b); } } } @@ -4469,10 +4463,9 @@ static void mark_table_blocks(e2fsck_t ctx) ctx->invalid_bitmaps++; } } else { - ext2fs_mark_block_bitmap(ctx->block_found_map, - fs->group_desc[i].bg_block_bitmap); - } - + ext2fs_mark_block_bitmap(ctx->block_found_map, + fs->group_desc[i].bg_block_bitmap); + } } /* * Mark block used for the inode bitmap @@ -4486,8 +4479,8 @@ static void mark_table_blocks(e2fsck_t ctx) ctx->invalid_bitmaps++; } } else { - ext2fs_mark_block_bitmap(ctx->block_found_map, - fs->group_desc[i].bg_inode_bitmap); + ext2fs_mark_block_bitmap(ctx->block_found_map, + fs->group_desc[i].bg_inode_bitmap); } } block += fs->super->s_blocks_per_group; @@ -5588,7 +5581,6 @@ static void e2fsck_pass2(e2fsck_t ctx) ext2fs_mark_super_dirty(fs); } } - } #define MAX_DEPTH 32000 @@ -9748,7 +9740,6 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx) if (print_answer) printf("%s.\n", answer ? _(preen_msg[(int) ptr->prompt]) : _("IGNORED")); - } if ((ptr->prompt == PROMPT_ABORT) && answer) @@ -11324,7 +11315,7 @@ static int release_inode_block(ext2_filsys fs, blk_t *block_nr, if ((blk < fs->super->s_first_data_block) || (blk >= fs->super->s_blocks_count)) { fix_problem(ctx, PR_0_ORPHAN_ILLEGAL_BLOCK_NUM, pctx); - return_abort: + return_abort: pb->abort = 1; return BLOCK_ABORT; } @@ -11537,7 +11528,7 @@ static int release_orphan_inodes(e2fsck_t ctx) } ext2fs_free_mem(&block_buf); return 0; -return_abort: + return_abort: ext2fs_free_mem(&block_buf); return 1; } @@ -11618,7 +11609,7 @@ static void check_resize_inode(e2fsck_t ctx) !(inode.i_mode & LINUX_S_IFREG) || (blk < fs->super->s_first_data_block || blk >= fs->super->s_blocks_count)) { - resize_inode_invalid: + resize_inode_invalid: if (fix_problem(ctx, PR_0_RESIZE_INODE_INVALID, &pctx)) { memset(&inode, 0, sizeof(inode)); e2fsck_write_inode(ctx, EXT2_RESIZE_INO, &inode, @@ -11660,10 +11651,9 @@ static void check_resize_inode(e2fsck_t ctx) } } -cleanup: + cleanup: ext2fs_free_mem(&dind_buf); - - } +} static void check_super_block(e2fsck_t ctx) { @@ -11842,7 +11832,6 @@ static void check_super_block(e2fsck_t ctx) (gd->bg_free_inodes_count > sb->s_inodes_per_group) || (gd->bg_used_dirs_count > sb->s_inodes_per_group)) ext2fs_unmark_valid(fs); - } /* @@ -11902,7 +11891,6 @@ static void check_super_block(e2fsck_t ctx) fs->super->s_feature_incompat &= ~EXT2_FEATURE_INCOMPAT_FILETYPE; ext2fs_mark_super_dirty(fs); - } } |