3 .\" Copyright (c) 1996 Doug Rabson
5 .\" All rights reserved.
7 .\" This program is free software.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 .Nd get and set attributes on a file or directory
42 .Fn VOP_GETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred"
44 .Fn VOP_SETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred"
46 .Fn VOP_STAT "struct vnode *vp" "struct stat *sb" "struct ucred *active_cred" \
47 "struct ucred *file_cred" "struct thread *td"
49 These entry points manipulate various attributes of a file or directory,
50 including file permissions, owner, group, size,
51 access time and modification time.
54 returns data in a format suitable for the
56 system call and by default is implemented as a wrapper around
58 Filesystems may want to implement their own variant for performance reasons.
67 The vnode of the file.
69 The attributes of the file.
71 The user credentials of the calling thread.
77 .Bl -tag -width active_cred
79 The vnode of the file.
81 The attributes of the file.
83 The user credentials of the calling thread.
85 The credentials installed on the file description pointing to the vnode or NOCRED.
90 Attributes which are not being modified by
92 should be set to the value
95 may be used to clear all the values, and should generally be used to reset
98 prior to setting specific values.
104 expect the vnode to be locked on entry and will leave the vnode locked on
106 The lock type can be either shared or exclusive.
109 expects the vnode to be locked on entry and will leave the vnode locked on
111 The lock type must be exclusive.
114 returns 0 if it was able to retrieve the attribute data via
116 otherwise an appropriate error is returned.
118 returns zero if the attributes were changed successfully, otherwise an
119 appropriate error is returned.
121 returns 0 if it was able to retrieve the attribute data
123 otherwise an appropriate error is returned.
127 The file is immutable.
129 The caller does not have permission to modify the file or directory attributes.
131 The file system is read-only.
138 This manual page was written by