aboutsummaryrefslogtreecommitdiff
path: root/lib/libcuse
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2022-07-13 14:30:36 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2022-07-20 08:41:11 +0000
commit280f34c37cc8947527da23e2612d436f1873fce5 (patch)
tree3d1baacf4c5a6698904557e8de3305a772f1a94c /lib/libcuse
parent58a8f6e9ecabba975f2cda8416bcc36c2073a7a8 (diff)
cuse(3): Make some clarifications in the manual page.
MFC after: 1 week Sponsored by: NVIDIA Networking
Diffstat (limited to 'lib/libcuse')
-rw-r--r--lib/libcuse/cuse.317
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/libcuse/cuse.3 b/lib/libcuse/cuse.3
index 0aff43ac2155..52f9ca4d225a 100644
--- a/lib/libcuse/cuse.3
+++ b/lib/libcuse/cuse.3
@@ -1,6 +1,6 @@
.\" $FreeBSD$
.\"
-.\" Copyright (c) 2010-2013 Hans Petter Selasky
+.\" Copyright (c) 2010-2022 Hans Petter Selasky
.\"
.\" All rights reserved.
.\"
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 17, 2019
+.Dd July 18, 2022
.Dt CUSE 3
.Os
.Sh NAME
@@ -124,6 +124,11 @@ mapped by
This function returns a valid data pointer on success or
.Dv NULL
on failure.
+The returned pointer is always aligned to the system page size.
+The number and size of allocations is limited by the
+.Xr mmap 2
+offset having to fit into a 32-bit variable typically for 32-bit
+applications.
.Pp
.Ft "int"
.Fn "cuse_is_vmalloc_addr" "void *"
@@ -137,16 +142,12 @@ Else this function returns zero.
This function frees memory allocated by
.Fn cuse_vmalloc .
This function is NULL safe.
-Note that the
-cuse library will internally not free the memory until the
-.Fn cuse_uninit
-function is called and that the number of unique
-allocations is limited.
.Pp
.Ft "unsigned long"
.Fn "cuse_vmoffset" "void *"
-This function returns the mmap offset that the client must use to
+This function returns the mmap offset the client must use to
access the allocated memory.
+The passed pointer must be aligned to the system page size.
.Pp
.Ft "struct cuse_dev *"
.Fn "cuse_dev_create" "const struct cuse_methods *mtod" "void *priv0" "void *priv1" "uid_t" "gid_t" "int permission" "const char *fmt" "..."