2001-01-12 Theodore Ts'o <tytso@valinux.com>
+ * util.c (fatal_error): Check to make sure the io_manager data
+ structure is sane before trying to flush the io_channel.
+ (From Andreas Dilger)
+
* pass2.c: Minor whitespace cleanups, from Andreas Dilger.
* journal.c (e2fsck_journal_fix_bad_inode): Set pctx->ino to the
fprintf (stderr, "e2fsck: %s\n", msg);
if (ctx->fs && ctx->fs->io)
io_channel_flush(ctx->fs->io);
+ if (ctx->fs && ctx->fs->io) {
+ if (ctx->fs->io->magic == EXT2_ET_MAGIC_IO_MANAGER)
+ io_channel_flush(ctx->fs->io);
+ else
+ fprintf(stderr, "e2fsck: io manager magic bad!\n");
+ }
ctx->flags |= E2F_FLAG_ABORT;
if (ctx->flags & E2F_FLAG_SETJMP_OK)
longjmp(ctx->abort_loc, 1);