ext2_ino_t ino;
errcode_t retval;
const char * const * cpp;
- int group, mount_flags;
+ dgrp_t group;
+ int mount_flags;
clear_problem_context(&pctx);
fprintf(f, "%*u", width, ctx->dir);
break;
case 'g':
- fprintf(f, "%*d", width, ctx->group);
+ fprintf(f, "%*u", width, ctx->group);
break;
case 'i':
fprintf(f, "%*u", width, ctx->ino);
struct process_block_struct pb;
ext2_ino_t ino = pctx->ino;
struct ext2_inode *inode = pctx->inode;
- int bad_size = 0;
+ unsigned bad_size = 0;
int dirty_inode = 0;
int extent_fs;
__u64 size;
return 0;
}
-static void new_table_block(e2fsck_t ctx, blk64_t first_block, int group,
+static void new_table_block(e2fsck_t ctx, blk64_t first_block, dgrp_t group,
const char *name, int num, blk64_t *new_block)
{
ext2_filsys fs = ctx->fs;
dgrp_t last_grp;
blk64_t old_block = *new_block;
blk64_t last_block;
- int i, is_flexbg, flexbg, flexbg_size;
+ dgrp_t flexbg;
+ unsigned flexbg_size;
+ int i, is_flexbg;
char *buf;
struct problem_context pctx;
dict_init(&de_dict, DICTCOUNT_T_MAX, dict_de_cmp);
prev = 0;
do {
- int group;
+ dgrp_t group;
ext2_ino_t first_unused_inode;
problem = 0;
struct problem_context pctx;
__u16 link_count, link_counted;
char *buf = 0;
- int group, maxgroup;
+ dgrp_t group, maxgroup;
init_resource_track(&rtrack, ctx->fs->io);
ext2_filsys fs = ctx->fs;
blk64_t i;
unsigned int *free_array;
- int group = 0;
+ dgrp_t g, group = 0;
unsigned int blocks = 0;
blk64_t free_blocks = 0;
blk64_t first_free = ext2fs_blocks_count(fs->super);
} else if (fixit == 0)
ext2fs_unmark_valid(fs);
- for (i = 0; i < fs->group_desc_count; i++) {
- if (free_array[i] != ext2fs_bg_free_blocks_count(fs, i)) {
- pctx.group = i;
- pctx.blk = ext2fs_bg_free_blocks_count(fs, i);
- pctx.blk2 = free_array[i];
+ for (g = 0; g < fs->group_desc_count; g++) {
+ if (free_array[g] != ext2fs_bg_free_blocks_count(fs, g)) {
+ pctx.group = g;
+ pctx.blk = ext2fs_bg_free_blocks_count(fs, g);
+ pctx.blk2 = free_array[g];
if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT_GROUP,
&pctx)) {
- ext2fs_bg_free_blocks_count_set(fs, i, free_array[i]);
+ ext2fs_bg_free_blocks_count_set(fs, g, free_array[g]);
ext2fs_mark_super_dirty(fs);
} else
ext2fs_unmark_valid(fs);
unsigned int free_inodes = 0;
int group_free = 0;
int dirs_count = 0;
- int group = 0;
+ dgrp_t group = 0;
unsigned int inodes = 0;
ext2_ino_t *free_array;
ext2_ino_t *dir_array;
struct ext2_dir_entry *dirent;
blk64_t blk, blk2;
e2_blkcnt_t blkcount;
- int group;
+ dgrp_t group;
__u32 csum1, csum2;
__u64 num;
const char *str;