"without deletion of an EA.\n"),
PROMPT_FIX, 0 },
+ /* invalid inode creation time */
+ { PR_1_CRTIME_BAD,
+ N_("@i %i creation time (%t) invalid.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK | PR_NO_OK },
+
+ /* Bad extended attribute value in inode */
+ { PR_1_SYMLINK_NUL,
+ N_("@i %i symlink missing NUL terminator. "),
+ PROMPT_FIX, 0},
+
/* Failed to goto block group */
{ PR_1_SCAN_GOTO,
N_("failed to goto block group"),
" %b--%c",
PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR, 0, 0, 0 },
+ /* Inode is badly corrupt (badness value = ) */
+ { PR_1B_INODE_TOOBAD,
+ N_("@i %i is badly corrupt (badness value = %N). "),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
/* Pass 1C: Scan directories for inodes with multiply-claimed blocks. */
{ PR_1C_PASS_HEADER,
N_("Pass 1C: Scanning directories for @is with @m @bs\n"),
N_("Duplicate filename @E found. "),
PROMPT_CLEAR, 0, 0, 0, 0 },
+ /* Inode is badly corrupt (badness value = ) */
+ { PR_2_INODE_TOOBAD,
+ N_("@i %i is badly corrupt (badness value = %N). "),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* Directory entry dirdata length set incorrectly */
+ { PR_2_CLEAR_DIRDATA,
+ N_("@E dirdata length set incorrectly.\n"),
+ PROMPT_CLEAR, PR_PREEN_OK },
/* Pass 3 errors */
fputs("/>\n", f);
}
-int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx)
+int fix_problem_loc(e2fsck_t ctx, problem_t code, struct problem_context *pctx,
+ int badness, const char *func, const int line)
{
ext2_filsys fs = ctx->fs;
struct e2fsck_problem *ptr;
int suppress = 0;
int fixed = 0;
+ /* ino is always set in pass1, where we will hit most badness */
+ if (pctx && pctx->ino != 0 && badness && code < PR_3_PASS_HEADER)
+ e2fsck_mark_inode_bad_loc(ctx, pctx, code, badness, func, line);
+
ptr = find_problem(code);
if (!ptr) {
printf(_("Unhandled error code (0x%x)!\n"), code);
if (ptr->flags & PR_LATCH_MASK &&
(ldesc = find_latch(ptr->flags & PR_LATCH_MASK)) != NULL) {
if (ldesc->question && !(ldesc->flags & PRL_LATCHED)) {
- ans = fix_problem(ctx, ldesc->question, pctx);
+ ans = fix_problem_loc(ctx, ldesc->question, pctx,
+ 0, func, line);
if (ans == 1)
ldesc->flags |= PRL_YES;
if (ans == 0)
fatal_error(ctx, 0);
if (ptr->flags & PR_AFTER_CODE)
- answer = fix_problem(ctx, ptr->second_code, pctx);
+ answer = fix_problem_loc(ctx, ptr->second_code, pctx,
+ 0, func, line);
if (answer && (ptr->prompt != PROMPT_NONE) &&
!(ptr->flags & PR_NOT_A_FIX)) {
return;
}
+void e2fsck_mark_inode_bad_loc(e2fsck_t ctx,
+ struct problem_context *pctx, __u32 code,
+ int count, const char *func, const int line)
+{
+ return;
+}
+
errcode_t
profile_get_string(profile_t profile, const char *name, const char *subname,
const char *subsubname, const char *def_val,