Deleted Added
sdiff udiff text old ( 152760 ) new ( 169299 )
full compact
1.\" Copyright (c) 2003 Poul-Henning Kamp
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright

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

20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" $FreeBSD: head/lib/libgeom/libgeom.3 152760 2005-11-24 10:43:35Z ru $
29.\"
30.Dd March 7, 2004
31.Dt LIBGEOM 3
32.Os
33.Sh NAME
34.Nm geom_stats_open ,
35.Nm geom_stats_close ,
36.Nm geom_stats_resync ,
37.Nm geom_stats_snapshot_get ,
38.Nm geom_stats_snapshot_free ,
39.Nm geom_stats_snapshot_timestamp ,
40.Nm geom_stats_snapshot_reset ,
41.Nm geom_stats_snapshot_next ,
42.Nm gctl_get_handle ,
43.Nm gctl_ro_param ,
44.Nm gctl_rw_param ,
45.Nm gctl_issue ,
46.Nm gctl_free ,
47.Nm gctl_dump
48.Nd userland API library for kernel GEOM subsystem
49.Sh LIBRARY
50.Lb libgeom
51.Sh SYNOPSIS
52.In libgeom.h
53.Ss "Statistics Functions"
54.Ft void
55.Fn geom_stats_close void

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

75.Ft void
76.Fn gctl_rw_param "struct gctl_req *req" "const char *name" "int len" "void *value"
77.Ft "const char *"
78.Fn gctl_issue "struct gctl_req *req"
79.Ft void
80.Fn gctl_free "struct gctl_req *req"
81.Ft void
82.Fn gctl_dump "struct gctl_req *req" "FILE *f"
83.Sh DESCRIPTION
84The
85.Nm geom
86library contains the official and publicized API for
87interacting with the GEOM subsystem in the kernel.
88.Ss "Statistics Functions"
89GEOM collects statistics data for all consumers and providers, but does
90not perform any normalization or presentation on the raw data, this is

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

227.Pp
228Error handling for the control functions is postponed until the call
229to
230.Fn gctl_issue ,
231which returns
232.Dv NULL
233on success, or an error message corresponding to the
234first error which happened.
235.Sh EXAMPLES
236Create a request that is to be sent to the CCD class, and tell
237it to destroy a specific geom:
238.Bd -literal -offset indent
239H = gctl_get_handle();
240gctl_ro_param(H, "verb", -1, "destroy geom");
241gctl_ro_param(H, "class", -1, "CCD");
242sprintf(buf, "ccd%d", ccd);

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

251.Sh HISTORY
252The
253.Nm geom
254library appeared in
255.Fx 5.1 .
256.Sh AUTHORS
257.An Poul-Henning Kamp Aq phk@FreeBSD.org
258.An Lukas Ertl Aq le@FreeBSD.org