From a846d2f49996c7675cd21da30956272422b67c81 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 10 Nov 1999 15:50:24 +0000 Subject: [PATCH] ChangeLog, problem.c, problemP.h: problem.c (fix_problem): Support a new flag, PR_PREEN_NO which means the answer is assumed to be no in preen mode. This is now used in the PR_1_SET_IMMUTABLE code, so that in preen mode we ignore these inodes and just print a warning message. --- e2fsck/ChangeLog | 8 ++++++++ e2fsck/problem.c | 7 ++++--- e2fsck/problemP.h | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 83caab8..f953cc7 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,11 @@ +1999-11-10 + + * problem.c (fix_problem): Support a new flag, PR_PREEN_NO which + means the answer is assumed to be no in preen mode. This + is now used in the PR_1_SET_IMMUTABLE code, so that in + preen mode we ignore these inodes and just print a warning + message. + 1999-11-09 * pass1.c (e2fsck_pass1): If the filesystem does not support diff --git a/e2fsck/problem.c b/e2fsck/problem.c index e265c5b..1a663cf 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -421,8 +421,7 @@ static const struct e2fsck_problem problem_table[] = { /* Immutable flag set on a device or socket inode */ { PR_1_SET_IMMUTABLE, "Special (device/socket/fifo) @i %i has immutable flag set. ", - PROMPT_CLEAR, 0 }, - + PROMPT_CLEAR, PR_PREEN_OK | PR_PREEN_NO | PR_NO_OK }, /* Pass 1b errors */ @@ -1070,7 +1069,9 @@ int fix_problem(e2fsck_t ctx, problem_t code, struct problem_context *pctx) return 0; } def_yn = 1; - if ((ptr->flags & PR_NO_DEFAULT) || (ctx->options & E2F_OPT_NO)) + if ((ptr->flags & PR_NO_DEFAULT) || + ((ptr->flags & PR_PREEN_NO) && (ctx->options & E2F_OPT_PREEN)) || + (ctx->options & E2F_OPT_NO)) def_yn= 0; /* diff --git a/e2fsck/problemP.h b/e2fsck/problemP.h index 7c75fc6..5738610 100644 --- a/e2fsck/problemP.h +++ b/e2fsck/problemP.h @@ -34,4 +34,5 @@ struct latch_descr { #define PR_PREEN_NOMSG 0x0200 /* Don't print a message if we're preening */ #define PR_NOCOLLATE 0x0400 /* Don't collate answers for this latch */ #define PR_NO_NOMSG 0x0800 /* Don't print a message if e2fsck -n */ +#define PR_PREEN_NO 0x1000 /* Use No as an answer if preening */ -- 1.8.3.1