1ATTR_REMOVE(3)               XFS Compatibility API              ATTR_REMOVE(3)
2
3
4

NAME

6       attr_remove, attr_removef - remove a user attribute of a filesystem ob‐
7       ject
8

C SYNOPSIS

10       #include <attr/attributes.h>
11
12       int attr_remove (const char *path, const char *attrname, int flags);
13
14       int attr_removef (int fd, const char *attrname, int flags);
15

DESCRIPTION

17       The attr_remove and attr_removef functions provide a way to remove pre‐
18       viously created attributes from filesystem objects.
19
20       Path  points  to  a path name for a filesystem object, and fd refers to
21       the file descriptor associated with a file.  If the attribute  attrname
22       exists, the attribute name and value will be removed from the fileystem
23       object.  The flags argument can contain the following  symbols  bitwise
24       OR´ed together:
25
26       ATTR_ROOT
27              Look for attrname in the root address space, not in the user ad‐
28              dress space.  (limited to use by super-user only)
29
30       ATTR_DONTFOLLOW
31              Do not follow  symbolic  links  when  resolving  a  path  on  an
32              attr_remove  function  call.   The default is to follow symbolic
33              links.
34
35       attr_remove will fail if one or more of the following are true:
36
37       [ENOATTR]        The attribute name given is not  associated  with  the
38                        indicated filesystem object.
39
40       [ENOENT]         The named file does not exist.
41
42       [EPERM]          The  effective user ID does not match the owner of the
43                        file and the effective user ID is not super-user.
44
45       [ENOTDIR]        A component of the path prefix is not a directory.
46
47       [EACCES]         Search permission is denied on a component of the path
48                        prefix.
49
50       [EINVAL]         A bit was set in the flag argument that is not defined
51                        for this system call.
52
53       [EFAULT]         Path points outside the allocated address space of the
54                        process.
55
56       [ELOOP]          A path name lookup involved too many symbolic links.
57
58       [ENAMETOOLONG]   The length of path exceeds {MAXPATHLEN}, or a pathname
59                        component is longer than {MAXNAMELEN}.
60
61       attr_removef will fail if:
62
63       [ENOATTR]      The attribute name given is not associated with the  in‐
64                      dicated filesystem object.
65
66       [EINVAL]       A  bit  was set in the flag argument that is not defined
67                      for this system call, or fd refers to a  socket,  not  a
68                      file.
69
70       [EFAULT]       Attrname  points  outside the allocated address space of
71                      the process.
72
73       [EBADF]        Fd does not refer to a valid descriptor.
74

DIAGNOSTICS

76       On success, zero is returned.  On error, -1 is returned, and  errno  is
77       set appropriately.
78

SEE ALSO

80       attr(1), attr_get(3), attr_list(3), attr_multi(3), attr_set(3)
81
82
83
84Dec 2001                      Extended Attributes               ATTR_REMOVE(3)
Impressum