Add a flag which returns the partially completed filesystem object so
e2fsck can print more intelligent error messages.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
#define EXT2_FLAG_IMAGE_FILE 0x2000
#define EXT2_FLAG_EXCLUSIVE 0x4000
#define EXT2_FLAG_SOFTSUPP_FEATURES 0x8000
+#define EXT2_FLAG_NOFREE_ON_ERROR 0x10000
/*
* Special flag in the ext2 inode i_flag field that means that this is
fs->stride = fs->super->s_raid_stride;
+ fs->flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
*ret_fs = fs;
return 0;
cleanup:
- ext2fs_free(fs);
+ if (flags & EXT2_FLAG_NOFREE_ON_ERROR)
+ *ret_fs = fs;
+ else
+ ext2fs_free(fs);
return retval;
}