+2000-06-10 Theodore Ts'o <tytso@valinux.com>
+
+ * pass5.c (check_block_bitmaps, check_inode_bitmaps): Add error
+ checking for a "should never happen case".
+
+ * problem.c, problem.h (PR_5_COPY_IBITMAP_ERROR,
+ PR_5_COPY_BBITMAP_ERROR): Add new error codes.
+
2000-05-27 Theodore Ts'o <tytso@valinux.com>
* pass1.c (pass1, check_size): Apply patch from Chris Wedgewood
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);
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);
{ PR_5_FUDGE_BITMAP_ERROR,
N_("Internal error: fudging end of bitmap (%N)\n"),
PROMPT_NONE, PR_FATAL },
-
+
+ /* Error copying in replacement inode bitmap */
+ { PR_5_COPY_IBITMAP_ERROR,
+ "Error copying in replacement @i @B: %m\n",
+ PROMPT_NONE, PR_FATAL },
+
+ /* Error copying in replacement block bitmap */
+ { PR_5_COPY_BBITMAP_ERROR,
+ "Error copying in replacement @b @B: %m\n",
+ PROMPT_NONE, PR_FATAL },
+
{ 0 }
};
/* Programming error: bitmap endpoints don't match */
#define PR_5_BMAP_ENDPOINTS 0x050010
-
+
/* Internal error: fudging end of bitmap */
#define PR_5_FUDGE_BITMAP_ERROR 0x050011
-
+
+/* Error copying in replacement inode bitmap */
+#define PR_5_COPY_IBITMAP_ERROR 0x050012
+
+/* Error copying in replacement block bitmap */
+#define PR_5_COPY_BBITMAP_ERROR 0x050013
+
/*
* Function declarations
*/