* src/copy.c (errno_unsupported): New function.
(copy_attr_error, copy_internal): Use it.
return false;
}
+static bool
+errno_unsupported (int err)
+{
+ return err == ENOTSUP || err == ENODATA;
+}
+
#if USE_XATTR
static void
copy_attr_error (struct error_context *ctx ATTRIBUTE_UNUSED,
int err = errno;
va_list ap;
+ if (!errno_unsupported (errno))
if (errno != ENOTSUP && errno != ENODATA)
{
/* use verror module to print error message */
}
else
{
- if ((errno != ENOTSUP && errno != ENODATA) || x->require_preserve_context)
+ if (!errno_unsupported (errno) || x->require_preserve_context)
{
if (!x->reduce_diagnostics || x->require_preserve_context)
error (0, errno,