mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-12 03:13:52 +08:00
libext2fs: cleanup usage of unsigned int or __u32 and replace it with blk_t
Signed-off-by: Valerie Clement <valerie.clement@bull.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
3bfca9a499
commit
5d38ef1d04
@ -36,11 +36,11 @@ extern char *optarg;
|
||||
|
||||
enum journal_location {JOURNAL_IS_INTERNAL, JOURNAL_IS_EXTERNAL};
|
||||
|
||||
#define ANY_BLOCK ((unsigned int) -1)
|
||||
#define ANY_BLOCK ((blk_t) -1)
|
||||
|
||||
int dump_all, dump_contents, dump_descriptors;
|
||||
unsigned int block_to_dump, group_to_dump, bitmap_to_dump;
|
||||
unsigned int inode_block_to_dump, inode_offset_to_dump, bitmap_to_dump;
|
||||
blk_t block_to_dump, bitmap_to_dump, inode_block_to_dump;
|
||||
unsigned int group_to_dump, inode_offset_to_dump;
|
||||
ext2_ino_t inode_to_dump;
|
||||
|
||||
struct journal_source
|
||||
@ -365,8 +365,8 @@ static void dump_journal(char *cmdname, FILE *out_file,
|
||||
if (dump_all) {
|
||||
fprintf(out_file, "\tuuid=%s\n", jsb_buffer);
|
||||
fprintf(out_file, "\tblocksize=%d\n", blocksize);
|
||||
fprintf(out_file, "\tjournal data size %ld\n",
|
||||
(long) sb->s_blocks_count);
|
||||
fprintf(out_file, "\tjournal data size %lu\n",
|
||||
sb->s_blocks_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,8 +114,8 @@ static void check_block_bitmaps(e2fsck_t ctx)
|
||||
blk_t i, super;
|
||||
int *free_array;
|
||||
int group = 0;
|
||||
unsigned int blocks = 0;
|
||||
unsigned int free_blocks = 0;
|
||||
blk_t blocks = 0;
|
||||
blk_t free_blocks = 0;
|
||||
int group_free = 0;
|
||||
int actual, bitmap;
|
||||
struct problem_context pctx;
|
||||
|
@ -467,7 +467,8 @@ void check_super_block(e2fsck_t ctx)
|
||||
dgrp_t i;
|
||||
blk_t should_be;
|
||||
struct problem_context pctx;
|
||||
__u32 free_blocks = 0, free_inodes = 0;
|
||||
blk_t free_blocks = 0;
|
||||
ino_t free_inodes = 0;
|
||||
|
||||
inodes_per_block = EXT2_INODES_PER_BLOCK(fs->super);
|
||||
ipg_max = inodes_per_block * (blocks_per_group - 4);
|
||||
|
@ -54,8 +54,8 @@ int ext2fs_super_and_bgd_loc(ext2_filsys fs,
|
||||
{
|
||||
blk_t group_block, super_blk = 0, old_desc_blk = 0, new_desc_blk = 0;
|
||||
unsigned int meta_bg, meta_bg_size;
|
||||
int numblocks, has_super;
|
||||
int old_desc_blocks;
|
||||
blk_t numblocks, old_desc_blocks;
|
||||
int has_super;
|
||||
|
||||
group_block = ext2fs_group_first_block(fs, group);
|
||||
|
||||
|
@ -407,7 +407,7 @@ typedef struct ext2_icount *ext2_icount_t;
|
||||
/*
|
||||
* For ext2 compression support
|
||||
*/
|
||||
#define EXT2FS_COMPRESSED_BLKADDR ((blk_t) 0xffffffff)
|
||||
#define EXT2FS_COMPRESSED_BLKADDR ((blk_t) -1)
|
||||
#define HOLE_BLKADDR(_b) ((_b) == 0 || (_b) == EXT2FS_COMPRESSED_BLKADDR)
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user