+2001-09-19 Theodore Tso <tytso@valinux.com>
+
+ * unix.c (main): If a superblock is specified explicitly by the
+ user, don't try to automatically fall back to an
+ alternate superblock.
+
2001-09-02 Theodore Tso <tytso@thunk.org>
* Release of E2fsprogs 1.24a
#define E2F_FLAG_PROG_BAR 0x0020 /* Progress bar on screen */
#define E2F_FLAG_PROG_SUPPRESS 0x0040 /* Progress suspended */
#define E2F_FLAG_JOURNAL_INODE 0x0080 /* Create a new ext3 journal inode */
+#define E2F_FLAG_SB_SPECIFIED 0x0100 /* The superblock was explicitly
+ * specified by the user */
/*
* Defines for indicating the e2fsck pass number
break;
case 'b':
ctx->use_superblock = atoi(optarg);
+ ctx->flags |= E2F_FLAG_SB_SPECIFIED;
break;
case 'B':
blocksize = atoi(optarg);
} else
retval = ext2fs_open(ctx->filesystem_name, flags,
0, 0, io_ptr, &fs);
- if (!ctx->superblock && !(ctx->options & E2F_OPT_PREEN) &&
+ if (!ctx->superblock && !(ctx->options & E2F_OPT_PREEN) &&
+ !(ctx->flags & E2F_FLAG_SB_SPECIFIED) &&
((retval == EXT2_ET_BAD_MAGIC) ||
((retval == 0) && ext2fs_check_desc(fs)))) {
if (!fs || (fs->group_desc_count > 1)) {