Deleted Added
full compact
g_consumer.9 (131594) g_consumer.9 (131689)
1.\"
2.\" Copyright (c) 2004 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

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

17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
1.\"
2.\" Copyright (c) 2004 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

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

17.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/share/man/man9/g_consumer.9 131594 2004-07-04 20:55:50Z ru $
25.\" $FreeBSD: head/share/man/man9/g_consumer.9 131689 2004-07-06 08:21:12Z ru $
26.\"
27.Dd January 16, 2004
26.\"
27.Dd January 16, 2004
28.Dt g_consumer 9
28.Dt G_CONSUMER 9
29.Os
30.Sh NAME
31.Nm g_new_consumer ,
32.Nm g_destroy_consumer
33.Nd "GEOM consumers management"
34.Sh SYNOPSIS
35.In geom/geom.h
36.Ft "struct g_consumer *"

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

49.Xr g_attach 9
50and opened with
51.Xr g_access 9 .
52.Pp
53The
54.Fn g_destroy_consumer
55function destroys the given consumer and cancels all related pending events.
56This function is the last stage of killing an unwanted consumer.
29.Os
30.Sh NAME
31.Nm g_new_consumer ,
32.Nm g_destroy_consumer
33.Nd "GEOM consumers management"
34.Sh SYNOPSIS
35.In geom/geom.h
36.Ft "struct g_consumer *"

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

49.Xr g_attach 9
50and opened with
51.Xr g_access 9 .
52.Pp
53The
54.Fn g_destroy_consumer
55function destroys the given consumer and cancels all related pending events.
56This function is the last stage of killing an unwanted consumer.
57.Pp
58.Sh RESTRICTIONS/CONDITIONS
59.Fn g_new_consumer :
60.Bl -item -offset indent
61.It
62The geom
63.Fa gp
64has to have
57.Sh RESTRICTIONS/CONDITIONS
58.Fn g_new_consumer :
59.Bl -item -offset indent
60.It
61The geom
62.Fa gp
63has to have
65.Fa start
64.Va start
66and
65and
67.Fa access
66.Va access
68methods defined.
69.It
70The topology lock has to be held.
71.El
72.Pp
73.Fn g_destroy_consumer :
74.Bl -item -offset indent
75.It
76The consumer must not be attached to a provider.
77.It
78The access count has to be 0.
79.It
80The topology lock has to be held.
81.El
82.Sh RETURN VALUES
67methods defined.
68.It
69The topology lock has to be held.
70.El
71.Pp
72.Fn g_destroy_consumer :
73.Bl -item -offset indent
74.It
75The consumer must not be attached to a provider.
76.It
77The access count has to be 0.
78.It
79The topology lock has to be held.
80.El
81.Sh RETURN VALUES
82The
83.Fn g_new_consumer
83.Fn g_new_consumer
84function
84returns a pointer to the newly created consumer.
85.Sh EXAMPLES
86Create consumer, attach it to given provider, gain read access and clean up.
87.Bd -literal -offset indent
88void
89some_function(struct g_geom *mygeom, struct g_provider *pp)
90{
91 struct g_consumer *cp;

--- 47 unchanged lines hidden ---
85returns a pointer to the newly created consumer.
86.Sh EXAMPLES
87Create consumer, attach it to given provider, gain read access and clean up.
88.Bd -literal -offset indent
89void
90some_function(struct g_geom *mygeom, struct g_provider *pp)
91{
92 struct g_consumer *cp;

--- 47 unchanged lines hidden ---