bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5775: [PATCH] doc: fix info to say cp -a does _not_ diagnose xattr f


From: Pádraig Brady
Subject: bug#5775: [PATCH] doc: fix info to say cp -a does _not_ diagnose xattr failures
Date: Sat, 10 Apr 2010 00:52:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 26/03/10 11:53, Pádraig Brady wrote:
> I was surprised that `cp --preserve=all file.xattr /dev/shm` produced no 
> warnings
> In any case, this makes the docs match the behaviour.

Actually some warnings could be output in this case so my patch is incorrect.
The xattr/selinux diagnostics from cp/mv/install are done like:

1. cp -a                        outputs no warnings
2. cp --preserve=all            outputs all but ENOTSUP
3. cp --preserve=xattr,context  outputs all errors
4. mv                           outputs all but ENOTSUP
5. install --preserve-context   outputs all but ENOTSUP

I'm not sure about treating xattr errors differently
to other attribute preservation errors, and in
addition ENOTSUP differently from other errors.
It just seems a bit inconsistent to me.

So how about simplifying the code to match the doc change.
I.E. don't output any warnings for 2,4 & 5 above.
A diff to do that is attached:
 copy.c    |   63 ++++++++++++++++----------------------------------------------
 copy.h    |   32 +++++++++++--------------------
 cp.c      |    2 -
 install.c |    1
 mv.c      |    1
 5 files changed, 29 insertions(+), 70 deletions(-)

Alternatively we could make 1 behave like 2,4,5?

cheers,
Pádraig.

Attachment: standard-diagnostics.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]