diff options
author | Pádraig Brady <P@draigBrady.com> | 2010-06-10 15:12:48 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-08-10 09:35:20 -0600 |
commit | 91fd3b18b755b77c4bb3f7556ddedb055c16c834 (patch) | |
tree | 63c2df4c9ffcc29c11ddba644f5cbbd466325850 /lib/acl-internal.h | |
parent | c7d2ab945f0ecf9ec6e0182186ab5e8c12783f4a (diff) | |
download | gnulib-91fd3b18b755b77c4bb3f7556ddedb055c16c834.tar.gz |
copy-acl: ignore ENOTSUP on HP-UX
Fixes Coreutils bug 6053.
* lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
so that it is available for HP-UX.
* lib/copy-acl.c (qcopy_acl): Use it.
Reported by Patrick M. Callahan.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib/acl-internal.h')
-rw-r--r-- | lib/acl-internal.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/acl-internal.h b/lib/acl-internal.h index 676e57aba3..7f9cde16d9 100644 --- a/lib/acl-internal.h +++ b/lib/acl-internal.h @@ -51,6 +51,18 @@ # define fchmod(fd, mode) (-1) #endif +/* Recognize some common errors such as from an NFS mount that does + not support ACLs, even when local drives do. */ +#if defined __APPLE__ && defined __MACH__ /* MacOS X */ +# define ACL_NOT_WELL_SUPPORTED(Err) \ + ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT) +#elif defined EOPNOTSUPP /* Tru64 NFS */ +# define ACL_NOT_WELL_SUPPORTED(Err) \ + ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP) +#else +# define ACL_NOT_WELL_SUPPORTED(Err) \ + ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY) +#endif #if USE_ACL @@ -125,17 +137,6 @@ rpl_acl_set_fd (int fd, acl_t acl) # define MODE_INSIDE_ACL 1 # endif -# if defined __APPLE__ && defined __MACH__ /* MacOS X */ -# define ACL_NOT_WELL_SUPPORTED(Err) \ - ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT) -# elif defined EOPNOTSUPP /* Tru64 NFS */ -# define ACL_NOT_WELL_SUPPORTED(Err) \ - ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP) -# else -# define ACL_NOT_WELL_SUPPORTED(Err) \ - ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY) -# endif - /* Return the number of entries in ACL. Return -1 and set errno upon failure to determine it. */ /* Define a replacement for acl_entries if needed. (Only Linux has it.) */ |