]>
Commit | Line | Data |
---|---|---|
91447636 A |
1 | .\" |
2 | .\" Copyright (c) 2004 Apple Computer, Inc. All rights reserved. | |
3 | .\" | |
21362eb3 | 4 | .\" @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
91447636 | 5 | .\" |
8f6c56a5 A |
6 | .\" This file contains Original Code and/or Modifications of Original Code |
7 | .\" as defined in and that are subject to the Apple Public Source License | |
8 | .\" Version 2.0 (the 'License'). You may not use this file except in | |
9 | .\" compliance with the License. Please obtain a copy of the License at | |
10 | .\" http://www.opensource.apple.com/apsl/ and read it before using this | |
91447636 A |
11 | .\" file. |
12 | .\" | |
8f6c56a5 A |
13 | .\" The Original Code and all software distributed under the License are |
14 | .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
15 | .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
16 | .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
17 | .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
18 | .\" Please see the License for the specific language governing rights and | |
91447636 A |
19 | .\" limitations under the License. |
20 | .\" | |
21362eb3 | 21 | .\" @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
91447636 A |
22 | .\" |
23 | .Dd Oct 19, 2004 | |
24 | .Dt REMOVEXATTR 2 | |
25 | .Os "Mac OS X" | |
26 | .Sh NAME | |
27 | .Nm removexattr, | |
28 | .Nm fremovexattr | |
29 | .Nd remove an extended attribute value | |
30 | .Sh SYNOPSIS | |
31 | .Fd #include <sys/xattr.h> | |
32 | .Ft int | |
33 | .Fn removexattr "const char *path" "const char *name" "int options" | |
34 | .Ft int | |
35 | .Fn fremovexattr "int fd" "const char *name" "int options" | |
36 | .Sh DESCRIPTION | |
37 | Extended attributes extend the basic attributes associated with files and | |
38 | directories in the file system. They are stored as name:data pairs | |
39 | associated with file system objects (files, directories, symlinks, etc). | |
40 | .Pp | |
41 | .Fn Removexattr | |
42 | deletes the extended attribute | |
43 | .Fa name | |
44 | associated with | |
45 | .Fa path . | |
46 | .Pp | |
47 | An extended attribute's | |
48 | .Fa name | |
49 | is a simple NULL-terminated UTF-8 string. | |
50 | .Fa Options | |
51 | is a bit mask specifying various options: | |
52 | .Pp | |
53 | .Bl -tag -width XATTR_NOFOLLOW | |
54 | .It Dv XATTR_NOFOLLOW | |
55 | do not follow symbolic links. Normally, | |
56 | .Fn removexattr | |
57 | acts on the target of | |
58 | .Fa path | |
59 | if it is a symbolic link. With this option, | |
60 | .Fn removexattr | |
61 | will act on the link itself. | |
62 | .El | |
63 | .Pp | |
64 | .Fn fremovexattr | |
65 | is identical to | |
66 | .Fn removexattr , | |
67 | except that it removes an extended attribute from an open file referenced | |
68 | by file descriptor | |
69 | .Fa fd . | |
70 | .Sh RETURN VALUES | |
71 | On success, 0 is returned. On failure, -1 is returned and the global | |
72 | variable | |
73 | .Va errno | |
74 | is set as follows. | |
75 | .Sh ERRORS | |
76 | .Bl -tag -width Er | |
77 | .It Bq Er ENOATTR | |
78 | The specified extended attribute does not exist. | |
79 | .It Bq Er ENOTSUP | |
80 | The file system does not support extended attributes or has the feature | |
81 | disabled. | |
82 | .It Bq Er EROFS | |
83 | The file system is mounted read-only. | |
84 | .It Bq Er EPERM | |
85 | This type of object does not support extended attributes. | |
86 | .It Bq Er EINVAL | |
87 | .Fa name | |
88 | or | |
89 | .Fa options | |
90 | is invalid. | |
91 | .Fa name | |
92 | must be valid UTF-8 | |
93 | .Fa options | |
94 | must make sense. | |
95 | .It Bq Er ENOTDIR | |
96 | A component of the | |
97 | .Fa path 's | |
98 | prefix is not a directory. | |
99 | .It Bq Er ENAMETOOLONG | |
100 | .Fa Name | |
101 | exceeded | |
102 | .Dv XATTR_MAXNAMELEN | |
103 | UTF-8 bytes, or a component of | |
104 | .Fa path | |
105 | exceeded | |
106 | .Dv NAME_MAX | |
107 | characters, or the entire | |
108 | .Fa path | |
109 | exceeded | |
110 | .Dv PATH_MAX | |
111 | characters. | |
112 | .It Bq Er EACCES | |
113 | Search permission is denied for a component | |
114 | .Fa path | |
115 | or permission to remove the attribute is denied. | |
116 | .It Bq Er ELOOP | |
117 | Too many symbolic links were encountered in | |
118 | .Fa path . | |
119 | .It Bq Er EFAULT | |
120 | .Fa path | |
121 | or | |
122 | .Fa name | |
123 | points to an invalid address. | |
124 | .It Bq Er EIO | |
125 | An I/O error occurred while reading from or writing to the file system. | |
126 | .El | |
127 | .Sh SEE ALSO | |
128 | .Xr getxattr 2 , | |
129 | .Xr setxattr 2 , | |
130 | .Xr listxattr 2 | |
131 | .Sh HISTORY | |
132 | .Fn removexattr | |
133 | and | |
134 | .Fn fremovexattr | |
135 | first appeared in Mac OS X 10.4. |