libgeom.3 (af3f36025b146acb03a057959e0ac8faf1f2fa13) libgeom.3 (3f7047aeebeed66f0963299083f3f18b6cba5de3)
1.\" Copyright (c) 2003 Poul-Henning Kamp
2.\" Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD$
30.\"
1.\" Copyright (c) 2003 Poul-Henning Kamp
2.\" Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD$
30.\"
31.Dd April 22, 2017
31.Dd October 16, 2017
32.Dt LIBGEOM 3
33.Os
34.Sh NAME
35.Nm geom_stats_open ,
36.Nm geom_stats_close ,
37.Nm geom_stats_resync ,
38.Nm geom_stats_snapshot_get ,
39.Nm geom_stats_snapshot_free ,
40.Nm geom_stats_snapshot_timestamp ,
41.Nm geom_stats_snapshot_reset ,
42.Nm geom_stats_snapshot_next ,
43.Nm gctl_get_handle ,
44.Nm gctl_ro_param ,
45.Nm gctl_rw_param ,
46.Nm gctl_issue ,
47.Nm gctl_free ,
48.Nm gctl_dump ,
32.Dt LIBGEOM 3
33.Os
34.Sh NAME
35.Nm geom_stats_open ,
36.Nm geom_stats_close ,
37.Nm geom_stats_resync ,
38.Nm geom_stats_snapshot_get ,
39.Nm geom_stats_snapshot_free ,
40.Nm geom_stats_snapshot_timestamp ,
41.Nm geom_stats_snapshot_reset ,
42.Nm geom_stats_snapshot_next ,
43.Nm gctl_get_handle ,
44.Nm gctl_ro_param ,
45.Nm gctl_rw_param ,
46.Nm gctl_issue ,
47.Nm gctl_free ,
48.Nm gctl_dump ,
49.Nm geom_getxml ,
50.Nm geom_xml2tree ,
51.Nm geom_gettree ,
52.Nm geom_deletetree ,
49.Nm g_open ,
50.Nm g_close ,
51.Nm g_mediasize ,
52.Nm g_sectorsize ,
53.Nm g_stripeoffset ,
54.Nm g_stripesize ,
55.Nm g_flush ,
56.Nm g_delete ,

--- 37 unchanged lines hidden (view full) ---

94.Fn gctl_rw_param "struct gctl_req *req" "const char *name" "int len" "void *value"
95.Ft "const char *"
96.Fn gctl_issue "struct gctl_req *req"
97.Ft void
98.Fn gctl_free "struct gctl_req *req"
99.Ft void
100.Fn gctl_dump "struct gctl_req *req" "FILE *f"
101.Ss "Utility Functions"
53.Nm g_open ,
54.Nm g_close ,
55.Nm g_mediasize ,
56.Nm g_sectorsize ,
57.Nm g_stripeoffset ,
58.Nm g_stripesize ,
59.Nm g_flush ,
60.Nm g_delete ,

--- 37 unchanged lines hidden (view full) ---

98.Fn gctl_rw_param "struct gctl_req *req" "const char *name" "int len" "void *value"
99.Ft "const char *"
100.Fn gctl_issue "struct gctl_req *req"
101.Ft void
102.Fn gctl_free "struct gctl_req *req"
103.Ft void
104.Fn gctl_dump "struct gctl_req *req" "FILE *f"
105.Ss "Utility Functions"
106.Ft "char *"
107.Fn geom_getxml void
102.Ft int
108.Ft int
109.Fn geom_xml2tree "struct gmesh *gmp" "char *p"
110.Ft int
111.Fn geom_gettree "struct gmesh *gmp"
112.Ft void
113.Fn geom_deletetree "struct gmesh *gmp"
114.Ft int
103.Fn g_open "const char *name" "int dowrite"
104.Ft int
105.Fn g_close "int fd"
106.Ft off_t
107.Fn g_mediasize "int fd"
108.Ft ssize_t
109.Fn g_sectorsize "int fd"
110.Ft ssize_t

--- 163 unchanged lines hidden (view full) ---

274to
275.Fn gctl_issue ,
276which returns
277.Dv NULL
278on success, or an error message corresponding to the
279first error which happened.
280.Ss "Utility Functions"
281The
115.Fn g_open "const char *name" "int dowrite"
116.Ft int
117.Fn g_close "int fd"
118.Ft off_t
119.Fn g_mediasize "int fd"
120.Ft ssize_t
121.Fn g_sectorsize "int fd"
122.Ft ssize_t

--- 163 unchanged lines hidden (view full) ---

286to
287.Fn gctl_issue ,
288which returns
289.Dv NULL
290on success, or an error message corresponding to the
291first error which happened.
292.Ss "Utility Functions"
293The
294.Fn geom_getxml
295function is a wrapper around
296.Xr sysctl 3
297that fetches the
298.Ar kern.geom.confxml
299OID, and returns it's value.
300The allocated memory should be released with
301.Xr free 2
302after use.
303.Pp
304The
305.Fn geom_xml2tree
306function parses the XML representation of a GEOM topology passed as
307.Ar p ,
308allocates the needed data structures to access this information and fills in
309the passed
310.Ar gmp
311data structure.
312Memory allocated during this transformation should be released
313using
314.Fn geom_deletetree
315after use.
316.Pp
317The
318.Fn geom_gettree
319function is a wrapper around the
320.Fn geom_getxml
321and
322.Fn geom_xml2tree
323functions.
324Memory allocated during this operation should be released using
325.Fn geom_deletetree
326after use.
327.Pp
328The
329.Fn geom_deletetree
330function releases memory allocated for storing the data-structures referenced by
331.Ar gmp .
332.Pp
333The
282.Fn g_*
283functions are used to communicate with GEOM providers.
284.Pp
285The
286.Fn g_open
287function opens the given provider and returns file descriptor number, which can
288be used with other functions.
289The

--- 107 unchanged lines hidden ---
334.Fn g_*
335functions are used to communicate with GEOM providers.
336.Pp
337The
338.Fn g_open
339function opens the given provider and returns file descriptor number, which can
340be used with other functions.
341The

--- 107 unchanged lines hidden ---