static void
emit_debug (const struct cp_options *x)
{
- if (! x->hard_link && ! x->symbolic_link)
+ if (! x->hard_link && ! x->symbolic_link && x->data_copy_required)
printf ("copy offload: %s, reflink: %s, sparse detection: %s\n",
copy_debug_string (copy_debug.offload),
copy_debug_string (copy_debug.reflink),
return_val = false;
goto close_src_and_dst_desc;
}
-
- /* Output debug info for data copying operations. */
- if (x->debug)
- emit_debug (x);
}
if (x->preserve_timestamps)
return_val = false;
}
+ /* Output debug info for data copying operations. */
+ if (x->debug)
+ emit_debug (x);
+
alignfree (buf);
return return_val;
}