Whamcloud - gitweb
Fixes necessary for e2fsprogs to work using the diet libc.
[tools/e2fsprogs.git] / e2fsck / pass5.c
index b39b313..e5964e6 100644 (file)
@@ -67,7 +67,7 @@ void e2fsck_pass5(e2fsck_t ctx)
 #ifdef RESOURCE_TRACK
        if (ctx->options & E2F_OPT_TIME2) {
                e2fsck_clear_progbar(ctx);
-               print_resource_track("Pass 5", &rtrack);
+               print_resource_track(_("Pass 5"), &rtrack);
        }
 #endif
 }
@@ -175,7 +175,12 @@ redo_counts:
                ext2fs_free_block_bitmap(fs->block_map);
                retval = ext2fs_copy_bitmap(ctx->block_found_map,
                                                  &fs->block_map);
-               /* XXX check retval --- should never fail! */
+               if (retval) {
+                       clear_problem_context(&pctx);
+                       fix_problem(ctx, PR_5_COPY_BBITMAP_ERROR, &pctx);
+                       ctx->flags |= E2F_FLAG_ABORT;
+                       return;
+               }
                ext2fs_set_bitmap_padding(fs->block_map);
                ext2fs_mark_bb_dirty(fs);
                
@@ -218,7 +223,7 @@ redo_counts:
 static void check_inode_bitmaps(e2fsck_t ctx)
 {
        ext2_filsys fs = ctx->fs;
-       ino_t   i;
+       ext2_ino_t      i;
        int     free_inodes = 0;
        int     group_free = 0;
        int     dirs_count = 0;
@@ -324,7 +329,12 @@ do_counts:
                ext2fs_free_inode_bitmap(fs->inode_map);
                retval = ext2fs_copy_bitmap(ctx->inode_used_map,
                                                  &fs->inode_map);
-               /* XXX check retval --- should never fail! */
+               if (retval) {
+                       clear_problem_context(&pctx);
+                       fix_problem(ctx, PR_5_COPY_IBITMAP_ERROR, &pctx);
+                       ctx->flags |= E2F_FLAG_ABORT;
+                       return;
+               }
                ext2fs_set_bitmap_padding(fs->inode_map);
                ext2fs_mark_ib_dirty(fs);
 
@@ -382,7 +392,7 @@ do_counts:
 static void check_inode_end(e2fsck_t ctx)
 {
        ext2_filsys fs = ctx->fs;
-       ino_t   end, save_inodes_count, i;
+       ext2_ino_t      end, save_inodes_count, i;
        struct problem_context  pctx;
 
        clear_problem_context(&pctx);