summaryrefslogtreecommitdiffstats
path: root/lib/libgeom
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2008-09-08 06:27:00 +0000
committerlulf <lulf@FreeBSD.org>2008-09-08 06:27:00 +0000
commit7646af6a7df1e62e310a81357e88deac99ab90ea (patch)
tree34c91e6d5aed1ab3b0a1168c571c92b7a1998096 /lib/libgeom
parent51f53f0bcf4aecf7ca159e0094ddad4dda67c68f (diff)
downloadFreeBSD-src-7646af6a7df1e62e310a81357e88deac99ab90ea.zip
FreeBSD-src-7646af6a7df1e62e310a81357e88deac99ab90ea.tar.gz
- Update the libgeom manpage with a description of g_device_path and
g_providername utility functions. Approved by: kib (mentor)
Diffstat (limited to 'lib/libgeom')
-rw-r--r--lib/libgeom/libgeom.329
1 files changed, 26 insertions, 3 deletions
diff --git a/lib/libgeom/libgeom.3 b/lib/libgeom/libgeom.3
index 4c2682d..9272d3b 100644
--- a/lib/libgeom/libgeom.3
+++ b/lib/libgeom/libgeom.3
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 6, 2007
+.Dd September 8, 2008
.Dt LIBGEOM 3
.Os
.Sh NAME
@@ -52,9 +52,11 @@
.Nm g_sectorsize ,
.Nm g_flush ,
.Nm g_delete ,
+.Nm g_device_path ,
.Nm g_get_ident ,
.Nm g_get_name ,
-.Nm g_open_by_ident
+.Nm g_open_by_ident ,
+.Nm g_providername
.Nd userland API library for kernel GEOM subsystem
.Sh LIBRARY
.Lb libgeom
@@ -103,12 +105,16 @@
.Fn g_flush "int fd"
.Ft int
.Fn g_delete "int fd" "off_t offset" "off_t length"
+.Ft "char *"
+.Fn g_device_path "const char *devpath"
.Ft int
.Fn g_get_ident "int fd" "char *ident" "size_t size"
.Ft int
.Fn g_get_name "const char *ident" "char *name" "size_t size"
.Ft int
.Fn g_open_by_ident "const char *ident" "int dowrite" "char *name" "size_t size"
+.Ft "char *"
+.Fn g_providername "int fd"
.Sh DESCRIPTION
The
.Nm geom
@@ -301,6 +307,13 @@ The
function tells the provider that the given data range is no longer used.
.Pp
The
+.Fn g_device_path
+function returns the full path to a provider given a partial or full path to the
+device node.
+If the device can not be found or is not a valid geom provider, NULL is
+returned.
+.Pp
+The
.Fn g_get_ident
function returns provider's fixed and unique identifier.
The
@@ -326,7 +339,17 @@ argument is not
.Dv NULL ,
the function will store provider's name there.
.Pp
-All functions return value greater than or equal to
+The
+.Fn g_providername
+function returns the provider name of an open file descriptor.
+If the file descriptor does not point to a valid geom provider, NULL is
+returned.
+.Pp
+All functions except
+.Fn g_providername
+and
+.Fn g_device_path
+return a value greater than or equal to
.Va 0
on success or
.Va -1
OpenPOWER on IntegriCloud