Whamcloud - gitweb
ChangeLog, pass1.c, problem.c:
authorTheodore Ts'o <tytso@mit.edu>
Mon, 3 Apr 2000 13:57:21 +0000 (13:57 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 3 Apr 2000 13:57:21 +0000 (13:57 +0000)
  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
e2fsck/pass1.c
e2fsck/problem.c

index e783b94..8bbf22e 100644 (file)
@@ -1,3 +1,11 @@
+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
index 771c505..3829509 100644 (file)
@@ -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");
 }
 
index 0a72061..42ceb53 100644 (file)
@@ -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 },