diff options
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_acl.c | 14 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_extattr.c | 32 |
2 files changed, 17 insertions, 29 deletions
diff --git a/sys/ufs/ufs/ufs_acl.c b/sys/ufs/ufs/ufs_acl.c index e5f79f1..242691a 100644 --- a/sys/ufs/ufs/ufs_acl.c +++ b/sys/ufs/ufs/ufs_acl.c @@ -242,10 +242,9 @@ ufs_getacl(ap) POSIX1E_ACL_ACCESS_EXTATTR_NAME, &len, (char *) ap->a_aclp, ap->a_td); switch (error) { - /* XXX: Will be ENOATTR. */ /* XXX: If ufs_getacl() should work on file systems without * the EA configured, add case EOPNOTSUPP here. */ - case ENOENT: + case ENOATTR: /* * Legitimately no ACL set on object, purely * emulate it through the inode. These fields will @@ -302,10 +301,9 @@ ufs_getacl(ap) * and an empty ACL, as required by POSIX.1e. */ switch (error) { - /* XXX: Will be ENOATTR. */ /* XXX: If ufs_getacl() should work on file systems without * the EA configured, add case EOPNOTSUPP here. */ - case ENOENT: + case ENOATTR: bzero(ap->a_aclp, sizeof(*ap->a_aclp)); ap->a_aclp->acl_cnt = 0; error = 0; @@ -420,10 +418,9 @@ ufs_setacl(ap) * XXX: Note that since we can't distinguish * "that EA is not supported" from "that EA is not * defined", the success case here overlaps the - * the ENOENT->EOPNOTSUPP case below. + * the ENOATTR->EOPNOTSUPP case below. */ - /* XXX: the ENOENT here will eventually be ENOATTR. */ - if (error == ENOENT) + if (error == ENOATTR) error = 0; } else error = vn_extattr_set(ap->a_vp, IO_NODELOCKED, @@ -439,8 +436,7 @@ ufs_setacl(ap) * Map lack of attribute definition in UFS_EXTATTR into lack of * support for ACLs on the file system. */ - /* XXX: ENOENT here will eventually be ENOATTR. */ - if (error == ENOENT) + if (error == ENOATTR) return (EOPNOTSUPP); if (error != 0) return (error); diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index 2ab61fb..55f3fa9 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -685,8 +685,7 @@ ufs_extattr_disable(struct ufsmount *ump, int attrnamespace, uele = ufs_extattr_find_attr(ump, attrnamespace, attrname); if (!uele) - /* XXX: ENOENT here will eventually be ENOATTR. */ - return (ENOENT); + return (ENOATTR); LIST_REMOVE(uele, uele_entries); @@ -881,8 +880,7 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name, attribute = ufs_extattr_find_attr(ump, attrnamespace, name); if (!attribute) - /* XXX: ENOENT here will eventually be ENOATTR. */ - return (ENOENT); + return (ENOATTR); if ((error = ufs_extattr_credcheck(vp, attribute, cred, td, IREAD))) return (error); @@ -937,8 +935,7 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name, /* Defined? */ if ((ueh.ueh_flags & UFS_EXTATTR_ATTR_FLAG_INUSE) == 0) { - /* XXX: ENOENT here will eventually be ENOATTR. */ - error = ENOENT; + error = ENOATTR; goto vopunlock_exit; } @@ -950,10 +947,9 @@ ufs_extattr_get(struct vnode *vp, int attrnamespace, const char *name, * is to coerce this to undefined, and let it get cleaned * up by the next write or extattrctl clean. */ - printf("ufs_extattr_get: inode number inconsistency (%d, %d)\n", - ueh.ueh_i_gen, ip->i_gen); - /* XXX: ENOENT here will eventually be ENOATTR. */ - error = ENOENT; + printf("ufs_extattr_get (%s): inode number inconsistency (%d, %d)\n", + mp->mnt_stat.f_mntonname, ueh.ueh_i_gen, ip->i_gen); + error = ENOATTR; goto vopunlock_exit; } @@ -1062,8 +1058,7 @@ ufs_extattr_set(struct vnode *vp, int attrnamespace, const char *name, attribute = ufs_extattr_find_attr(ump, attrnamespace, name); if (!attribute) - /* XXX: ENOENT here will eventually be ENOATTR. */ - return (ENOENT); + return (ENOATTR); if ((error = ufs_extattr_credcheck(vp, attribute, cred, td, IWRITE))) return (error); @@ -1174,8 +1169,7 @@ ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, attribute = ufs_extattr_find_attr(ump, attrnamespace, name); if (!attribute) - /* XXX: ENOENT here will eventually be ENOATTR. */ - return (ENOENT); + return (ENOATTR); if ((error = ufs_extattr_credcheck(vp, attribute, cred, td, IWRITE))) return (error); @@ -1220,8 +1214,7 @@ ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, /* Defined? */ if ((ueh.ueh_flags & UFS_EXTATTR_ATTR_FLAG_INUSE) == 0) { - /* XXX: ENOENT here will eventually be ENOATTR. */ - error = ENOENT; + error = ENOATTR; goto vopunlock_exit; } @@ -1233,10 +1226,9 @@ ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, * coerce this to undefined, and let it get cleaned up by * the next write or extattrctl clean. */ - printf("ufs_extattr_rm: inode number inconsistency (%d, %d)\n", - ueh.ueh_i_gen, ip->i_gen); - /* XXX: ENOENT here will eventually be ENOATTR. */ - error = ENOENT; + printf("ufs_extattr_rm (%s): inode number inconsistency (%d, %d)\n", + mp->mnt_stat.f_mntonname, ueh.ueh_i_gen, ip->i_gen); + error = ENOATTR; goto vopunlock_exit; } |