* Handle errors gracefully.
*/
switch (errno) {
-#if defined(BACL_ENOTSUP)
- case BACL_ENOTSUP:
+ case ENOSYS:
+ case ENOTSUP:
+ case EOPNOTSUPP:
/**
* If the filesystem reports it doesn't support ACLs we clear the
* BACL_FLAG_SAVE_NATIVE flag so we skip ACL saves on all other files
*/
jcr->acl_data->flags &= ~BACL_FLAG_SAVE_NATIVE;
goto bail_out;
-#endif
case ENOENT:
goto bail_out;
default:
switch (errno) {
case ENOENT:
return bacl_exit_ok;
-#if defined(BACL_ENOTSUP)
- case BACL_ENOTSUP:
+ case ENOSYS:
+ case ENOTSUP:
+ case EOPNOTSUPP:
Mmsg1(jcr->errmsg, _("acl_delete_def_file error on file \"%s\": filesystem doesn't support ACLs\n"),
jcr->last_fname);
return bacl_exit_ok;
-#endif
default:
Mmsg2(jcr->errmsg, _("acl_delete_def_file error on file \"%s\": ERR=%s\n"),
jcr->last_fname, be.bstrerror());
case ENOENT:
acl_free(acl);
return bacl_exit_ok;
-#if defined(BACL_ENOTSUP)
- case BACL_ENOTSUP:
+ case ENOSYS:
+ case ENOTSUP:
+ case EOPNOTSUPP:
Mmsg1(jcr->errmsg, _("acl_set_file error on file \"%s\": filesystem doesn't support ACLs\n"),
jcr->last_fname);
Dmsg2(100, "acl_set_file error acl=%s file=%s filesystem doesn't support ACLs\n",
jcr->acl_data->content, jcr->last_fname);
acl_free(acl);
return bacl_exit_ok;
-#endif
default:
Mmsg2(jcr->errmsg, _("acl_set_file error on file \"%s\": ERR=%s\n"),
jcr->last_fname, be.bstrerror());
if ((n = getacl(jcr->last_fname, 0, acls)) < 0) {
switch (errno) {
-#if defined(BACL_ENOTSUP)
- case BACL_ENOTSUP:
+ case ENOSYS:
+ case ENOTSUP:
+ case EOPNOTSUPP:
/**
* Not supported, just pretend there is nothing to see
*
pm_strcpy(jcr->acl_data->content, "");
jcr->acl_data->content_length = 0;
return bacl_exit_ok;
-#endif
case ENOENT:
pm_strcpy(jcr->acl_data->content, "");
jcr->acl_data->content_length = 0;
#define ACL_TYPE_NONE 0x0
#endif
-#if defined(HAVE_FREEBSD_OS)
-#define BACL_ENOTSUP EOPNOTSUPP
-#elif defined(HAVE_DARWIN_OS)
-#define BACL_ENOTSUP EOPNOTSUPP
-#elif defined(HAVE_HPUX_OS)
-#define BACL_ENOTSUP EOPNOTSUPP
-#elif defined(HAVE_IRIX_OS)
-#define BACL_ENOTSUP ENOSYS
-#elif defined(HAVE_LINUX_OS)
-#define BACL_ENOTSUP ENOTSUP
-#endif
-
#define BACL_FLAG_SAVE_NATIVE 0x01
#define BACL_FLAG_SAVE_AFS 0x02