Fix a problem introduced by the last commit.
[dragonfly.git] / share / man / man9 / VOP_GETEXTATTR.9
1 .\"-
2 .\" Copyright (c) 1999 Robert N. M. Watson
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD: src/share/man/man9/VOP_GETEXTATTR.9,v 1.1.2.3 2001/12/17 11:30:18 ru Exp $
27 .\" $DragonFly: src/share/man/man9/VOP_GETEXTATTR.9,v 1.2 2003/06/17 04:37:01 dillon Exp $
28 .\"
29 .Dd December 23, 1999
30 .Os
31 .Dt VOP_GETEXTATTR 9
32 .Sh NAME
33 .Nm VOP_GETEXTATTR
34 .Nd retrieve named extended attribute from a vnode
35 .Sh SYNOPSIS
36 .In sys/param.h
37 .In sys/vnode.h
38 .In sys/extattr.h
39 .Ft int
40 .Fn VOP_GETEXTATTR "struct vnode *vp" "char *name" "struct uio *uio" "struct ucred *cred" "struct proc *p"
41 .Sh DESCRIPTION
42 This vnode call may be used to retrieve a specific named extended attribute
43 from a file or directory.
44 .Pp
45 Its arguments are:
46 .Bl -tag -width type
47 .It Fa vp
48 the vnode of the file or directory
49 .It Fa name
50 pointer to a null-terminated character string containing the attribute name
51 .It Fa uio
52 the location of the data to be read or written
53 .It Fa cred
54 the user credentials to use in authorizing the request
55 .It Fa p
56 the process requesting the extended attribute
57 .El
58 .Pp
59 The
60 .Fa cred
61 pointer may be
62 .Dv NULL
63 to indicate that access control checks are not to be performed, if possible.
64 This
65 .Fa cred
66 setting might be used to allow the kernel to authorize extended attribute
67 retrieval that the active process might not be permitted to do.
68 .Pp
69 Extended attribute semantics may vary by file system implementing the call.
70 More information on extended attributes may be found in
71 .Xr extattr 9 .
72 .Sh LOCKS
73 No locks are required to call this vnode method, and any locks held on
74 entry will be held on exit.
75 .Sh RETURN VALUES
76 On success, zero will be returned, and the uio structure will be updated to
77 reflect data read.  Otherwise, an appropriate error code is returned.
78 .Sh ERRORS
79 .Bl -tag -width Er
80 .It Bq Er ENOENT
81 The attribute name is not defined for this vnode
82 .It Bq Er EACCES
83 Permission denied
84 .It Bq Er ENXIO
85 The request was not valid in this file system for the specified vnode and
86 attribute name.
87 .It Bq Er ENOMEM
88 Insufficient memory available to fulfill request
89 .It Bq Er EFAULT
90 The uio structure refers to an invalid userspace address.
91 .It Bq Er EINVAL
92 The
93 .Fa name
94 or
95 .Fa uio
96 argument is invalid.
97 .It Bq Er EOPNOTSUPP
98 The file system does not support
99 .Fn VOP_GETEXTATTR
100 .El
101 .Sh SEE ALSO
102 .Xr extattr 9 ,
103 .Xr vnode 9 ,
104 .Xr VOP_SETEXTATTR 9