jeff.liu wrote: > Is it better to adjust the error string from "failed to clone dst_name" to > "failed to clone > src_name" when clone operation fails? or maybe it would confuse the user IMHO.
Hi Jeff, Thanks for the patch. Mentioning only one of source and destination, I prefer to list the destination name, since it is more often relevant than the source. Sometimes it's useful to know both (e.g., EXDEV) so I propose this instead: I changed the log message, too, but left your name as author, so I'll wait for an ACK from you before pushing. >From d5bd22605a9ff8289d6c02cd2d3e81d460bae873 Mon Sep 17 00:00:00 2001 From: Jeff Liu <[email protected]> Date: Sun, 24 Apr 2011 16:25:31 +0200 Subject: [PATCH] copy: include both src and dest names in clone failure diagnostic * src/copy.c (copy_reg): Upon btrfs clone failure, print not just the destination file name, but also the source file name. That may be useful upon failure of a cross-device clone attempt. --- src/copy.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/copy.c b/src/copy.c index 6edf52e..65566a0 100644 --- a/src/copy.c +++ b/src/copy.c @@ -974,7 +974,8 @@ copy_reg (char const *src_name, char const *dst_name, { if (!clone_ok) { - error (0, errno, _("failed to clone %s"), quote (dst_name)); + error (0, errno, _("failed to clone %s from %s"), + quote (dst_name), quote (src_name)); return_val = false; goto close_src_and_dst_desc; } -- 1.7.5.rc3.316.gd1ff9
