On 11/07/2012 08:56 PM, Benno Schulenberg wrote:
On Fri, Oct 19, 2012, at 11:17, Jim Meyering wrote:
Please ping us if they're not applied soon after 8.20.

I've adjusted the 2 remaining patches a little.

First to use the doc: prefix on the summary to
indicate they're not logic changes.

I've adjusted the chcon.c change a little to
keep the alphabetical ordering for the options,
and to reuse text (translations) from existing
--help documentation in chgrp etc.

I'll push the attached in a while.

Thanks for following up!
Pádraig.
>From 85df3124edea493b85d9497754922ee0860c04ba Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensb...@justemail.net>
Date: Mon, 15 Oct 2012 13:06:37 +0200
Subject: [PATCH 1/2] doc: with cp -n, option -f is not redundant but ignored

* src/cp.c (usage): Replace "redundant" with "ignored".
* doc/coreutils.texi (cp invocation): Likewise.
---
 doc/coreutils.texi |    4 ++--
 src/cp.c           |    5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index b251b3d..f126f49 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7734,8 +7734,8 @@ description of @option{--remove-destination}.
 This option is independent of the @option{--interactive} or
 @option{-i} option: neither cancels the effect of the other.
 
-This option is redundant if the @option{--no-clobber} or @option{-n} option is
-used.
+This option is ignored when the @option{--no-clobber} or @option{-n} option
+is also used.
 
 @item -H
 @opindex -H
diff --git a/src/cp.c b/src/cp.c
index 61b31af..231d6a3 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -177,9 +177,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
   -f, --force                  if an existing destination file cannot be\n\
-                                 opened, remove it and try again (redundant if\
-\n\
-                                 the -n option is used)\n\
+                                 opened, remove it and try again (this option\n\
+                                 is ignored when the -n option is also used)\n\
   -i, --interactive            prompt before overwrite (overrides a previous -n\
 \n\
                                   option)\n\
-- 
1.7.6.4


>From 64b8a1729e62cfe2cc8f62c3a0231e4475c53f78 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensb...@justemail.net>
Date: Mon, 15 Oct 2012 19:37:34 +0200
Subject: [PATCH 2/2] doc: chcon: add descriptions for three undocumented
 options

These were missed in this related change v8.14-104-g44e20cd

* src/chcon.c (usage): Mention the two --preserve-root options.
* doc/coreutils.texi (chcon invocation): Plus the --dereferece option.
---
 doc/coreutils.texi |   20 ++++++++++++++++++--
 src/chcon.c        |    4 ++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index f126f49..7f8c0d1 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -1384,7 +1384,7 @@ legitimate uses for such a command,
 that resolves to @file{/}.  If you really want to try to remove all
 the files on your system, you can use the @option{--no-preserve-root}
 option, but the default behavior, specified by the
-@option{--preserve-option}, is safer for most purposes.
+@option{--preserve-root} option, is safer for most purposes.
 
 The commands @command{chgrp}, @command{chmod} and @command{chown}
 can also operate destructively on entire hierarchies, so they too
@@ -15256,12 +15256,16 @@ The program accepts the following options.  Also see @ref{Common options}.
 
 @table @samp
 
+@item --dereference
+@opindex --dereference
+Do not affect symbolic links but what they refer to; this is the default.
+
 @item -h
 @itemx --no-dereference
 @opindex -h
 @opindex --no-dereference
 @cindex no dereference
-Affect symbolic links instead of any referenced file.
+Affect the symbolic links themselves instead of any referenced file.
 
 @item --reference=@var{rfile}
 @opindex --reference
@@ -15274,6 +15278,18 @@ Use @var{rfile}'s security context rather than specifying a @var{context} value.
 @opindex --recursive
 Operate on files and directories recursively.
 
+@item --preserve-root
+@opindex --preserve-root
+Refuse to operate recursively on the root directory, @file{/},
+when used together with the @option{--recursive} option.
+@xref{Treating / specially}.
+
+@item --no-preserve-root
+@opindex --no-preserve-root
+Do not treat the root directory, @file{/}, specially when operating
+recursively; this is the default.
+@xref{Treating / specially}.
+
 @choptH
 @xref{Traversing symlinks}.
 
diff --git a/src/chcon.c b/src/chcon.c
index 34e92e4..66075f5 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -371,6 +371,10 @@ With --reference, change the security context of each FILE to that of RFILE.\n\
   -l, --range=RANGE      set range RANGE in the target security context\n\
 "), stdout);
       fputs (_("\
+      --no-preserve-root  do not treat '/' specially (the default)\n\
+      --preserve-root    fail to operate recursively on '/'\n\
+"), stdout);
+      fputs (_("\
       --reference=RFILE  use RFILE's security context rather than specifying\n\
                          a CONTEXT value\n\
 "), stdout);
-- 
1.7.6.4

Reply via email to