Blame SOURCES/e2fsprogs-1.42.9-chattr-manpage-reorder.patch

0ef434
commit 5b9aaae742a79ef6001e58e5031b5f6ec03fe1ad
0ef434
Author: Eric Sandeen <sandeen@redhat.com>
0ef434
Date:   Fri Jul 4 23:02:59 2014 -0400
0ef434
0ef434
    e2fsprogs: reorder flags in chattr(1)
0ef434
    
0ef434
    The flags described in chattr usage() and the chattr(1) manpage
0ef434
    were in semi-random order, which makes it hard to ascertain
0ef434
    which flags might be missing or undocumented, and to locate
0ef434
    flags within the manpage.
0ef434
    
0ef434
    Re-order the list of flags in alphanumeric order, and do
0ef434
    the same for the flag descriptions in the body of the manpage.
0ef434
    
0ef434
    There should be no content changes here, just reordering
0ef434
    for consistency.
0ef434
    
0ef434
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
0ef434
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
0ef434
    Reviewed-by: Andreas Dilger <adilger@dilger.ca>
0ef434
0ef434
diff --git a/misc/chattr.1.in b/misc/chattr.1.in
0ef434
index 2a3640c..ce426e8 100644
0ef434
--- a/misc/chattr.1.in
0ef434
+++ b/misc/chattr.1.in
0ef434
@@ -19,24 +19,36 @@ chattr \- change file attributes on a Linux file system
0ef434
 .B chattr
0ef434
 changes the file attributes on a Linux file system.
0ef434
 .PP
0ef434
-The format of a symbolic mode is +-=[acdeijstuACDST].
0ef434
+The format of a symbolic mode is +-=[aAcCdDeijsStTu].
0ef434
 .PP
0ef434
 The operator `+' causes the selected attributes to be added to the
0ef434
 existing attributes of the files; `-' causes them to be removed; and
0ef434
 `=' causes them to be the only attributes that the files have.
0ef434
 .PP
0ef434
-The letters `acdeijstuACDST' select the new attributes for the files:
0ef434
-append only (a), compressed (c), no dump (d), extent format (e), immutable (i),
0ef434
-data journalling (j), secure deletion (s), no tail-merging (t),
0ef434
-undeletable (u), no atime updates (A), no copy on write (C),
0ef434
-synchronous directory updates (D), synchronous updates (S),
0ef434
-and top of directory hierarchy (T).
0ef434
+The letters `aAcCdDeijsStTu' select the new attributes for the files:
0ef434
+append only (a),
0ef434
+no atime updates (A),
0ef434
+compressed (c),
0ef434
+no copy on write (C),
0ef434
+no dump (d),
0ef434
+synchronous directory updates (D),
0ef434
+extent format (e),
0ef434
+immutable (i),
0ef434
+data journalling (j),
0ef434
+secure deletion (s),
0ef434
+synchronous updates (S),
0ef434
+no tail-merging (t),
0ef434
+top of directory hierarchy (T),
0ef434
+and undeletable (u).
0ef434
 .PP
0ef434
 The following attributes are read-only, and may be listed by
0ef434
 .BR lsattr (1)
0ef434
-but not modified by chattr: huge file (h), compression error (E),
0ef434
-indexed directory (I), compression raw access (X), and compressed dirty
0ef434
-file (Z).
0ef434
+but not modified by chattr:
0ef434
+compression error (E),
0ef434
+huge file (h),
0ef434
+indexed directory (I),
0ef434
+compression raw access (X),
0ef434
+and compressed dirty file (Z).
0ef434
 .SH OPTIONS
0ef434
 .TP
0ef434
 .B \-R
0ef434
@@ -51,14 +63,14 @@ Suppress most error messages.
0ef434
 .BI \-v " version"
0ef434
 Set the file's version/generation number.
0ef434
 .SH ATTRIBUTES
0ef434
-When a file with the 'A' attribute set is accessed, its atime record is
0ef434
-not modified.  This avoids a certain amount of disk I/O for laptop
0ef434
-systems.
0ef434
-.PP
0ef434
 A file with the `a' attribute set can only be open in append mode for writing.
0ef434
 Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE
0ef434
 capability can set or clear this attribute.
0ef434
 .PP
0ef434
+When a file with the 'A' attribute set is accessed, its atime record is
0ef434
+not modified.  This avoids a certain amount of disk I/O for laptop
0ef434
+systems.
0ef434
+.PP
0ef434
 A file with the `c' attribute set is automatically compressed on the disk
0ef434
 by the kernel.  A read from this file returns uncompressed data.  A write to
0ef434
 this file compresses data before storing them on the disk.  Note: please
0ef434
@@ -74,27 +86,21 @@ be fully stable.  If the 'C' flag is set on a directory, it will have no
0ef434
 effect on the directory, but new files created in that directory will
0ef434
 the No_COW attribute.)
0ef434
 .PP
0ef434
-When a directory with the `D' attribute set is modified,
0ef434
-the changes are written synchronously on the disk; this is equivalent to
0ef434
-the `dirsync' mount option applied to a subset of the files.
0ef434
-.PP
0ef434
 A file with the `d' attribute set is not candidate for backup when the
0ef434
 .BR dump (8)
0ef434
 program is run.
0ef434
 .PP
0ef434
-The 'E' attribute is used by the experimental compression patches to
0ef434
-indicate that a compressed file has a compression error.  It may not be
0ef434
-set or reset using
0ef434
-.BR chattr (1),
0ef434
-although it can be displayed by
0ef434
-.BR lsattr (1).
0ef434
+When a directory with the `D' attribute set is modified,
0ef434
+the changes are written synchronously on the disk; this is equivalent to
0ef434
+the `dirsync' mount option applied to a subset of the files.
0ef434
 .PP
0ef434
 The 'e' attribute indicates that the file is using extents for mapping
0ef434
 the blocks on disk.  It may not be removed using
0ef434
 .BR chattr (1).
0ef434
 .PP
0ef434
-The 'I' attribute is used by the htree code to indicate that a directory
0ef434
-is being indexed using hashed trees.  It may not be set or reset using
0ef434
+The 'E' attribute is used by the experimental compression patches to
0ef434
+indicate that a compressed file has a compression error.  It may not be
0ef434
+set or reset using
0ef434
 .BR chattr (1),
0ef434
 although it can be displayed by
0ef434
 .BR lsattr (1).
0ef434
@@ -111,6 +117,12 @@ renamed, no link can be created to this file and no data can be written
0ef434
 to the file.  Only the superuser or a process possessing the
0ef434
 CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
0ef434
 .PP
0ef434
+The 'I' attribute is used by the htree code to indicate that a directory
0ef434
+is being indexed using hashed trees.  It may not be set or reset using
0ef434
+.BR chattr (1),
0ef434
+although it can be displayed by
0ef434
+.BR lsattr (1).
0ef434
+.PP
0ef434
 A file with the `j' attribute has all of its data written to the ext3
0ef434
 or ext4 journal before being written to the file itself, if the filesystem
0ef434
 is mounted with the "data=ordered" or "data=writeback" options.  When the
0ef434
@@ -127,6 +139,13 @@ When a file with the `S' attribute set is modified,
0ef434
 the changes are written synchronously on the disk; this is equivalent to
0ef434
 the `sync' mount option applied to a subset of the files.
0ef434
 .PP
0ef434
+A file with the 't' attribute will not have a partial block fragment at
0ef434
+the end of the file merged with other files (for those filesystems which
0ef434
+support tail-merging).  This is necessary for applications such as LILO
0ef434
+which read the filesystem directly, and which don't understand tail-merged
0ef434
+files.  Note: As of this writing, the ext2 or ext3 filesystems do not
0ef434
+(yet, except in very experimental patches) support tail-merging.
0ef434
+.PP
0ef434
 A directory with the 'T' attribute will be deemed to be the top of
0ef434
 directory hierarchies for the purposes of the Orlov block allocator.
0ef434
 This is a hint to the block allocator used by ext3 and ext4 that the
0ef434
@@ -137,13 +156,6 @@ and /home/mary are placed into separate block groups.  For directories
0ef434
 where this attribute is not set, the Orlov block allocator will try to
0ef434
 group subdirectories closer together where possible.
0ef434
 .PP
0ef434
-A file with the 't' attribute will not have a partial block fragment at
0ef434
-the end of the file merged with other files (for those filesystems which
0ef434
-support tail-merging).  This is necessary for applications such as LILO
0ef434
-which read the filesystem directly, and which don't understand tail-merged
0ef434
-files.  Note: As of this writing, the ext2 or ext3 filesystems do not
0ef434
-(yet, except in very experimental patches) support tail-merging.
0ef434
-.PP
0ef434
 When a file with the `u' attribute set is deleted, its contents are
0ef434
 saved.  This allows the user to ask for its undeletion.  Note: please
0ef434
 make sure to read the bugs and limitations section at the end of this
0ef434
diff --git a/misc/chattr.c b/misc/chattr.c
0ef434
index 39a6016..d5a6a61 100644
0ef434
--- a/misc/chattr.c
0ef434
+++ b/misc/chattr.c
0ef434
@@ -83,7 +83,7 @@ static unsigned long sf;
0ef434
 static void usage(void)
0ef434
 {
0ef434
 	fprintf(stderr,
0ef434
-		_("Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"),
0ef434
+		_("Usage: %s [-RVf] [-+=aAcCdDeijsSu] [-v version] files...\n"),
0ef434
 		program_name);
0ef434
 	exit(1);
0ef434
 }