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

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