summaryrefslogtreecommitdiff
path: root/share/man/man9/file.9
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man9/file.9')
-rw-r--r--share/man/man9/file.912
1 files changed, 10 insertions, 2 deletions
diff --git a/share/man/man9/file.9 b/share/man/man9/file.9
index 4549c5c6da5..d6d771088c0 100644
--- a/share/man/man9/file.9
+++ b/share/man/man9/file.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: file.9,v 1.20 2019/07/15 04:20:38 visa Exp $
+.\" $OpenBSD: file.9,v 1.21 2019/12/31 16:59:35 visa Exp $
.\"
.\" Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
.\" All rights reserved.
@@ -22,7 +22,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 15 2019 $
+.Dd $Mdocdate: December 31 2019 $
.Dt FALLOC 9
.Os
.Sh NAME
@@ -31,6 +31,7 @@
.Nm FREF ,
.Nm FRELE ,
.Nm fd_getfile ,
+.Nm fd_getfile_mode ,
.Nm getsock ,
.Nm getvnode
.Nd an overview of file descriptor handling
@@ -47,6 +48,8 @@
.Fn FRELE "struct file *fp" "struct proc *p"
.Ft struct file *
.Fn fd_getfile "struct filedesc *fdp" "int fd"
+.Ft struct file *
+.Fn fd_getfile_mode "struct filedesc *fdp" "int fd" "int mode"
.Ft int
.Fn getsock "struct proc *p" "int fd" "struct file **fpp"
.In sys/file.h
@@ -106,6 +109,11 @@ valid.
It also increases the descriptor's use count with
.Fn FREF .
.Pp
+.Fn fd_getfile_mode
+is like
+.Fn fd_getfile
+but also checks if the file has been opened with the given mode.
+.Pp
The files are extracted from the process context using the
function
.Fn getsock