From: Ondřej Vašík Date: Fri, 11 Oct 2013 16:07:37 +0000 (+0100) Subject: cp: correct error message for invalid arguments of '--no-preserve' X-Git-Tag: v8.22~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=743be23ed0c535ef69db8d2112874061ae3ec5b8;p=thirdparty%2Fcoreutils.git cp: correct error message for invalid arguments of '--no-preserve' * src/cp.c (decode_preserve_arg): Correct error message for invalid arguments of '--no-preserve'. Reported by M.Vadkerti in http://bugzilla.redhat.com/1018206 Fixes http://bugs.gnu.org/15588 --- diff --git a/src/cp.c b/src/cp.c index e235b326d4..7bc8630fbc 100644 --- a/src/cp.c +++ b/src/cp.c @@ -854,7 +854,8 @@ decode_preserve_arg (char const *arg, struct cp_options *x, bool on_off) *comma++ = 0; /* process S. */ - val = XARGMATCH ("--preserve", s, preserve_args, preserve_vals); + val = XARGMATCH (on_off ? "--preserve" : "--no-preserve", + s, preserve_args, preserve_vals); switch (val) { case PRESERVE_MODE: