Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man9 Document new functions vn_bdev_open and vn_bd...
details: https://anonhg.NetBSD.org/src/rev/90d52a4964e8
branches: trunk
changeset: 461148:90d52a4964e8
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Nov 16 22:09:56 2019 +0000
description:
Document new functions vn_bdev_open and vn_bdev_openpath.
diffstat:
share/man/man9/vnsubr.9 | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diffs (50 lines):
diff -r 53f03c54a153 -r 90d52a4964e8 share/man/man9/vnsubr.9
--- a/share/man/man9/vnsubr.9 Sat Nov 16 22:06:49 2019 +0000
+++ b/share/man/man9/vnsubr.9 Sat Nov 16 22:09:56 2019 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: vnsubr.9,v 1.45 2017/01/05 09:54:03 wiz Exp $
+.\" $NetBSD: vnsubr.9,v 1.46 2019/11/16 22:09:56 mlelstv Exp $
.\"
.\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -41,6 +41,8 @@
.Nm vn_marktext ,
.Nm vn_rdwr ,
.Nm vn_open ,
+.Nm vn_bdev_open ,
+.Nm vn_bdev_openpath ,
.Nm vn_stat ,
.Nm vn_writechk
.Nd high-level convenience functions for vnode operations
@@ -65,6 +67,10 @@
.Ft int
.Fn vn_open "struct nameidata *ndp" "int fmode" "int cmode"
.Ft int
+.Fn vn_bdev_open "dev_t dev" "struct vnode **vpp" "struct lwp *l"
+.Ft int
+.Fn vn_bdev_openpath "struct pathbuf *pb" "struct vnode **vpp" "struct lwp *l"
+.Ft int
.Fo vn_rdwr
.Fa "enum uio_rw rw" "struct vnode *vp" "void *base"
.Fa "int len" "off_t offset" "enum uio_seg segflg" "int ioflg"
@@ -173,6 +179,20 @@
vnode operations.
If the operation is successful zero is returned and the vnode is locked,
otherwise an appropriate error code is returned.
+.It Fn vn_bdev_open "dev" "vpp" "l"
+Opens a block device by its device number for reading and writing, and
+stores the vnode pointer into
+.Fa *vpp .
+The argument
+.Fa l
+is the calling process. The vnode can be closed and freed with
+.Fa vn_close .
+.It Fn vn_bdev_openpath "pb" "vpp" "l"
+Works like
+.Fn vn_bdev_open
+but looks up a filesystem path
+.Fa pb
+to determine the device ID.
.It Fn vn_rdwr "rw" "vp" "base" "len" "offset" "segflg" "ioflg" "cred" "aresid" "l"
Common code to package up an I/O request on a vnode into a uio and
then perform the I/O.
Home |
Main Index |
Thread Index |
Old Index