#include "ext2fs/ext2fsP.h"
#include "uuid/uuid.h"
#include "util.h"
-#include "plausible.h"
-#include "profile.h"
-#include "prof_err.h"
+#include "support/nls-enable.h"
+#include "support/plausible.h"
+#include "support/profile.h"
+#include "support/prof_err.h"
#include "../version.h"
-#include "quota/quotaio.h"
+#include "support/quotaio.h"
#include "mke2fs.h"
#include "create_inode.h"
-#include "nls-enable.h"
#define STRIDE_LENGTH 8
EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|
EXT4_FEATURE_RO_COMPAT_GDT_CSUM|
EXT4_FEATURE_RO_COMPAT_BIGALLOC|
-#ifdef CONFIG_QUOTA
EXT4_FEATURE_RO_COMPAT_QUOTA|
-#endif
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM
};
/* (re)open a specific undo file */
if (undo_file && undo_file[0] != 0) {
- set_undo_io_backing_manager(*io_ptr);
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto err;
*io_ptr = undo_io_manager;
retval = set_undo_io_backup_file(undo_file);
if (retval)
printf(_("Overwriting existing filesystem; this can be undone "
"using the command:\n"
" e2undo %s %s\n\n"), undo_file, name);
- return 0;
+ return retval;
}
/*
if ((unlink(tdb_file) < 0) && (errno != ENOENT)) {
retval = errno;
+ com_err(program_name, retval,
+ _("while trying to delete %s"), tdb_file);
goto errout;
}
- set_undo_io_backing_manager(*io_ptr);
+ retval = set_undo_io_backing_manager(*io_ptr);
+ if (retval)
+ goto errout;
*io_ptr = undo_io_manager;
retval = set_undo_io_backup_file(tdb_file);
if (retval)
}
if (super_only) {
+ check_plausibility(device_name, CHECK_FS_EXIST, NULL);
+ printf(_("%s may be further corrupted by superblock rewrite\n"),
+ device_name);
+ if (!force)
+ proceed_question(proceed_delay);
fs->super->s_state |= EXT2_ERROR_FS;
fs->flags &= ~(EXT2_FLAG_IB_DIRTY|EXT2_FLAG_BB_DIRTY);
- /*
+ /*
* The command "mke2fs -S" is used to recover
* corrupted file systems, so do not mark any of the
* inodes as unused; we want e2fsck to consider all
EXT2_ROOT_INO);
if (retval) {
com_err(program_name, retval, "%s",
- _("\nError while populating file system\n"));
+ _("while populating file system"));
exit(1);
} else if (!quiet)
printf("%s", _("done\n"));