diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-12-31 16:59:36 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-12-31 16:59:36 +0000 |
commit | 5061b51b46d61da625d3717f8b008576c8c49e35 (patch) | |
tree | 0674bc91b045e0c5b9df137a9be43ec4bea4afac /share/man/man9 | |
parent | da91bab33fd98134f4b87c4857d0b9edc9763514 (diff) |
Document fd_getfile_mode(9).
OK mpi@
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/file.9 | 12 |
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 |