From 01fbc701413a4975e6ed551ae6ccb8bb791ea515 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 3 Apr 2000 13:57:21 +0000 Subject: [PATCH] ChangeLog, pass1.c, problem.c: pass1.c (check_immutable, e2fsck_pass1_check_device_inode): Check for the append-only as well as the immutable flag. problem.c (PR_1_SET_IMMUTABLE): Adjust message to include append-only flag. Fix comment for compression flag. --- e2fsck/ChangeLog | 8 ++++++++ e2fsck/pass1.c | 9 +++++---- e2fsck/problem.c | 5 +++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index e783b94..8bbf22e 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,11 @@ +2000-03-20 Theodore Ts'o + + * pass1.c (check_immutable, e2fsck_pass1_check_device_inode): + Check for the append-only as well as the immutable flag. + + * problem.c (PR_1_SET_IMMUTABLE): Adjust message to include + append-only flag. Fix comment for compression flag. + 2000-02-12 * unix.c (e2fsck_update_progress): Limit the number of updates to diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 771c505..3829509 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -134,7 +134,7 @@ int e2fsck_pass1_check_device_inode(struct ext2_inode *inode) * you can't set or clear immutable flags for devices.) Once * the kernel has been fixed we can change this... */ - if (inode->i_flags & EXT2_IMMUTABLE_FL) { + if (inode->i_flags & (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL)) { for (i=4; i < EXT2_N_BLOCKS; i++) if (inode->i_block[i]) return 0; @@ -143,17 +143,18 @@ int e2fsck_pass1_check_device_inode(struct ext2_inode *inode) } /* - * If the immutable flag is set on the inode, offer to clear it. + * If the immutable (or append-only) flag is set on the inode, offer + * to clear it. */ static void check_immutable(e2fsck_t ctx, struct problem_context *pctx) { - if (!(pctx->inode->i_flags & EXT2_IMMUTABLE_FL)) + if (!(pctx->inode->i_flags & (EXT2_IMMUTABLE_FL | EXT2_APPEND_FL))) return; if (!fix_problem(ctx, PR_1_SET_IMMUTABLE, pctx)) return; - pctx->inode->i_flags &= ~EXT2_IMMUTABLE_FL; + pctx->inode->i_flags &= ~((EXT2_IMMUTABLE_FL | EXT2_APPEND_FL)); e2fsck_write_inode(ctx, pctx->ino, pctx->inode, "pass1"); } diff --git a/e2fsck/problem.c b/e2fsck/problem.c index 0a72061..42ceb53 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -420,10 +420,11 @@ static const struct e2fsck_problem problem_table[] = { /* Immutable flag set on a device or socket inode */ { PR_1_SET_IMMUTABLE, - N_("Special (device/socket/fifo) @i %i has immutable flag set. "), + N_("Special (device/socket/fifo) @i %i has immutable or " + "append-only flag set.\n"), PROMPT_CLEAR, PR_PREEN_OK | PR_PREEN_NO | PR_NO_OK }, - /* Imagic flag set on an inode when filesystem doesn't support it */ + /* Compression flag set on an inode when filesystem doesn't support it */ { PR_1_COMPR_SET, N_("@i %i has @cion flag set on @f without @cion support. "), PROMPT_CLEAR, 0 }, -- 1.8.3.1