coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] cp/reflink-perm fails on btrfs (and probably on ocfs2, t


From: Jim Meyering
Subject: Re: [coreutils] cp/reflink-perm fails on btrfs (and probably on ocfs2, too)
Date: Mon, 02 May 2011 16:33:00 +0200

jeff.liu wrote:
> Sorry, I have made a mistake in previous version, it should call 'quote_n' 
> instead I think.
>
> Or upon a clone failure, the diagnostic message was shown as:
> jeff@jeff-wowo:/btrfs/coreutils$ ./src/cp --reflink=always /ocfs2/a /btrfs/b
> ./src/cp: failed to clone `/btrfs/b' from `/btrfs/b': Invalid cross-device 
> link
>
>
> Below patch can fix it.
> diff --git a/src/copy.c b/src/copy.c
> index 65566a0..801a474 100644
> --- a/src/copy.c
> +++ b/src/copy.c
> @@ -975,7 +975,7 @@ copy_reg (char const *src_name, char const *dst_name,
>            if (!clone_ok)
>              {
>                error (0, errno, _("failed to clone %s from %s"),
> -                     quote (dst_name), quote (src_name));
> +                     quote_n (0, dst_name), quote_n (1, src_name));
>                return_val = false;
>                goto close_src_and_dst_desc;
>              }

Actually, I made that mistake.
Thanks for catching it.

> then:
> jeff@jeff-wowo:/btrfs/coreutils$ ./src/cp --reflink=always /ocfs2/a /btrfs/b
> ./src/cp: failed to clone `/btrfs/b' from `/ocfs2/a': Invalid cross-device 
> link

I'll soon push the patch below.

> Btw, I'd like to re-submit the ocfs2 relink patch soon, how about if I post 
> it to this thread and
> close the old ticket at:
> http://lists.gnu.org/archive/html/bug-coreutils/2010-04/msg00185.html

You're welcome to close any ticket that you opened,
but if you're posting a patch unrelated to this one,
it probably deserves its own thread.


>From 94054bac3fc5796b7860dbeaf53625f6614ae7bd Mon Sep 17 00:00:00 2001
From: Jeff Liu <address@hidden>
Date: Mon, 2 May 2011 16:26:32 +0200
Subject: [PATCH] copy: correct misuse of quote in diagnostic

* src/copy.c (copy_reg): Multiple uses of quote (s) in an
argument list is erroneous.  Use quote_n, instead.
---
 src/copy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/copy.c b/src/copy.c
index 65566a0..186086e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -975,7 +975,7 @@ copy_reg (char const *src_name, char const *dst_name,
           if (!clone_ok)
             {
               error (0, errno, _("failed to clone %s from %s"),
-                     quote (dst_name), quote (src_name));
+                     quote_n (0, dst_name), quote_1 (1, src_name));
               return_val = false;
               goto close_src_and_dst_desc;
             }
--
1.7.5.141.g791a



reply via email to

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