]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: cleanup usage of unsigned int or __u32 and replace it with blk_t
authorValerie Clement <valerie.clement@bull.net>
Thu, 30 Aug 2007 15:33:40 +0000 (17:33 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 15 Oct 2007 01:54:28 +0000 (21:54 -0400)
Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/logdump.c
e2fsck/pass5.c
e2fsck/super.c
lib/ext2fs/closefs.c
lib/ext2fs/ext2fs.h

index 724193e3c545d3a000fe4b5f5a7505b7c78f2bb7..cf3aae6d4d5fbe70e01f4b2b74acb0e813102900 100644 (file)
@@ -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);
                }
        }
        
index 53248b01b502692c8936bb4715cbb5ff5644bd02..8e3794d18175d11871371b799eb82874145e0aae 100644 (file)
@@ -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;
index a4835f76f3a4021d61e51fe5182facf739b8c90b..e3943cbe6d2500f3449fe9ff834d493169d4374e 100644 (file)
@@ -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);
index 64f010e7fc1ad28792158f350e76d42e5cb28ba1..2086331dbb8258b83076ed1f9501ca9893ba89f1 100644 (file)
@@ -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);
 
index 5536b6053ca3c8fe7a58c29f339c6e8133b3e985..d691c1be860da554c81973db392386593783f313 100644 (file)
@@ -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)
 
 /*