g_geom.9 (126861) | g_geom.9 (127371) |
---|---|
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_geom.9 126861 2004-03-11 19:53:22Z pjd $ | 25.\" $FreeBSD: head/share/man/man9/g_geom.9 127371 2004-03-24 14:25:46Z pjd $ |
26.\" 27.Dd January 16, 2004 28.Dt g_geom 9 29.Os 30.Sh NAME 31.Nm g_new_geomf , 32.Nm g_destroy_geom 33.Nd "geom management" --- 73 unchanged lines hidden (view full) --- 107The geom can not posses any providers. 108.It 109The geom can not posses any consumers. 110.It 111The topology lock has to be held. 112.El 113.Sh RETURN VALUES 114.Fn g_new_geomf | 26.\" 27.Dd January 16, 2004 28.Dt g_geom 9 29.Os 30.Sh NAME 31.Nm g_new_geomf , 32.Nm g_destroy_geom 33.Nd "geom management" --- 73 unchanged lines hidden (view full) --- 107The geom can not posses any providers. 108.It 109The geom can not posses any consumers. 110.It 111The topology lock has to be held. 112.El 113.Sh RETURN VALUES 114.Fn g_new_geomf |
115returns a pointer to the newly created geom or 116.Dv NULL 117if an error occured. | 115returns a pointer to the newly created geom. |
118.Sh EXAMPLES 119Create an example geom. 120.Bd -literal -offset indent 121static struct geom * 122g_example_start(struct bio *bp) 123{ 124 125 [...] --- 27 unchanged lines hidden (view full) --- 153static struct g_geom * 154create_example_geom(struct g_class *myclass) 155{ 156 struct g_geom *gp; 157 158 g_topology_lock(); 159 gp = g_new_geomf(myclass, "example_geom"); 160 g_topology_unlock(); | 116.Sh EXAMPLES 117Create an example geom. 118.Bd -literal -offset indent 119static struct geom * 120g_example_start(struct bio *bp) 121{ 122 123 [...] --- 27 unchanged lines hidden (view full) --- 151static struct g_geom * 152create_example_geom(struct g_class *myclass) 153{ 154 struct g_geom *gp; 155 156 g_topology_lock(); 157 gp = g_new_geomf(myclass, "example_geom"); 158 g_topology_unlock(); |
161 if (gp != NULL) { 162 gp->start = g_example_start; 163 gp->orphan = g_example_orphan; 164 gp->spoiled = g_example_spoiled; 165 gp->access = g_example_access; 166 gp->softc = NULL; 167 } | 159 gp->start = g_example_start; 160 gp->orphan = g_example_orphan; 161 gp->spoiled = g_example_spoiled; 162 gp->access = g_example_access; 163 gp->softc = NULL; |
168 169 return (gp); 170} 171 172static int 173destroy_example_geom(struct g_geom *gp) 174{ 175 --- 28 unchanged lines hidden --- | 164 165 return (gp); 166} 167 168static int 169destroy_example_geom(struct g_geom *gp) 170{ 171 --- 28 unchanged lines hidden --- |