+2000-03-20 Theodore Ts'o <tytso@valinux.com>
+
+ * 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 <tytso@snap.thunk.org>
* unix.c (e2fsck_update_progress): Limit the number of updates to
* 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;
}
/*
- * 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");
}
/* 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 },