diff options
Diffstat (limited to 'e2fsprogs/ext2fs/bitmaps.c')
-rw-r--r-- | e2fsprogs/ext2fs/bitmaps.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/e2fsprogs/ext2fs/bitmaps.c b/e2fsprogs/ext2fs/bitmaps.c index 7edd28d7b..932c345fa 100644 --- a/e2fsprogs/ext2fs/bitmaps.c +++ b/e2fsprogs/ext2fs/bitmaps.c | |||
@@ -35,7 +35,7 @@ static errcode_t make_bitmap(__u32 start, __u32 end, __u32 real_end, | |||
35 | errcode_t retval; | 35 | errcode_t retval; |
36 | size_t size; | 36 | size_t size; |
37 | 37 | ||
38 | retval = ext2fs_get_mem(sizeof(struct ext2fs_struct_generic_bitmap), | 38 | retval = ext2fs_get_mem(sizeof(struct ext2fs_struct_generic_bitmap), |
39 | &bitmap); | 39 | &bitmap); |
40 | if (retval) | 40 | if (retval) |
41 | return retval; | 41 | return retval; |
@@ -106,7 +106,7 @@ void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map) | |||
106 | ext2fs_set_bit(j, map->bitmap); | 106 | ext2fs_set_bit(j, map->bitmap); |
107 | 107 | ||
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | 110 | ||
111 | errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs, | 111 | errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs, |
112 | const char *descr, | 112 | const char *descr, |
@@ -128,11 +128,11 @@ errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs, | |||
128 | descr, &bitmap); | 128 | descr, &bitmap); |
129 | if (retval) | 129 | if (retval) |
130 | return retval; | 130 | return retval; |
131 | 131 | ||
132 | bitmap->magic = EXT2_ET_MAGIC_INODE_BITMAP; | 132 | bitmap->magic = EXT2_ET_MAGIC_INODE_BITMAP; |
133 | bitmap->fs = fs; | 133 | bitmap->fs = fs; |
134 | bitmap->base_error_code = EXT2_ET_BAD_INODE_MARK; | 134 | bitmap->base_error_code = EXT2_ET_BAD_INODE_MARK; |
135 | 135 | ||
136 | *ret = bitmap; | 136 | *ret = bitmap; |
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
@@ -151,9 +151,9 @@ errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs, | |||
151 | 151 | ||
152 | start = fs->super->s_first_data_block; | 152 | start = fs->super->s_first_data_block; |
153 | end = fs->super->s_blocks_count-1; | 153 | end = fs->super->s_blocks_count-1; |
154 | real_end = (EXT2_BLOCKS_PER_GROUP(fs->super) | 154 | real_end = (EXT2_BLOCKS_PER_GROUP(fs->super) |
155 | * fs->group_desc_count)-1 + start; | 155 | * fs->group_desc_count)-1 + start; |
156 | 156 | ||
157 | retval = ext2fs_allocate_generic_bitmap(start, end, real_end, | 157 | retval = ext2fs_allocate_generic_bitmap(start, end, real_end, |
158 | descr, &bitmap); | 158 | descr, &bitmap); |
159 | if (retval) | 159 | if (retval) |
@@ -162,7 +162,7 @@ errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs, | |||
162 | bitmap->magic = EXT2_ET_MAGIC_BLOCK_BITMAP; | 162 | bitmap->magic = EXT2_ET_MAGIC_BLOCK_BITMAP; |
163 | bitmap->fs = fs; | 163 | bitmap->fs = fs; |
164 | bitmap->base_error_code = EXT2_ET_BAD_BLOCK_MARK; | 164 | bitmap->base_error_code = EXT2_ET_BAD_BLOCK_MARK; |
165 | 165 | ||
166 | *ret = bitmap; | 166 | *ret = bitmap; |
167 | return 0; | 167 | return 0; |
168 | } | 168 | } |
@@ -171,7 +171,7 @@ errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap, | |||
171 | ext2_ino_t end, ext2_ino_t *oend) | 171 | ext2_ino_t end, ext2_ino_t *oend) |
172 | { | 172 | { |
173 | EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_INODE_BITMAP); | 173 | EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_INODE_BITMAP); |
174 | 174 | ||
175 | if (end > bitmap->real_end) | 175 | if (end > bitmap->real_end) |
176 | return EXT2_ET_FUDGE_INODE_BITMAP_END; | 176 | return EXT2_ET_FUDGE_INODE_BITMAP_END; |
177 | if (oend) | 177 | if (oend) |
@@ -184,7 +184,7 @@ errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap, | |||
184 | blk_t end, blk_t *oend) | 184 | blk_t end, blk_t *oend) |
185 | { | 185 | { |
186 | EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_BLOCK_BITMAP); | 186 | EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_BLOCK_BITMAP); |
187 | 187 | ||
188 | if (end > bitmap->real_end) | 188 | if (end > bitmap->real_end) |
189 | return EXT2_ET_FUDGE_BLOCK_BITMAP_END; | 189 | return EXT2_ET_FUDGE_BLOCK_BITMAP_END; |
190 | if (oend) | 190 | if (oend) |