xref: /freebsd/share/man/man9/g_provider_by_name.9 (revision 2008043f386721d58158e37e0d7e50df8095942d)
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
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
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.Dd January 29, 2021
26.Dt G_PROVIDER_BY_NAME 9
27.Os
28.Sh NAME
29.Nm g_provider_by_name
30.Nd "find GEOM provider with given name"
31.Sh SYNOPSIS
32.In geom/geom.h
33.Ft "struct g_provider *"
34.Fn g_provider_by_name "const char *name"
35.Sh DESCRIPTION
36The
37.Fn g_provider_by_name
38function searches for a provider called
39.Fa name
40and returns the structure
41.Vt g_provider
42bound to it.
43Argument
44.Fa name
45can be a name or full path (i.e.,
46.Dq Pa da0 ,
47or
48.Dq Pa /dev/da0 ) .
49.Sh RESTRICTIONS/CONDITIONS
50The topology lock has to be held.
51.Sh RETURN VALUES
52The
53.Fn g_provider_by_name
54function
55returns a pointer to the provider called
56.Fa name
57or
58.Dv NULL
59if there is no such provider.
60.Sh SEE ALSO
61.Xr geom 4 ,
62.Xr DECLARE_GEOM_CLASS 9 ,
63.Xr g_access 9 ,
64.Xr g_attach 9 ,
65.Xr g_bio 9 ,
66.Xr g_consumer 9 ,
67.Xr g_data 9 ,
68.Xr g_event 9 ,
69.Xr g_geom 9 ,
70.Xr g_provider 9 ,
71.Xr g_wither_geom 9
72.Sh AUTHORS
73.An -nosplit
74This manual page was written by
75.An Pawel Jakub Dawidek Aq Mt pjd@FreeBSD.org .
76