---
name: "g_provider_by_name"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/g_provider_by_name/9freebsd"
---

# g\_provider\_by\_name(9freebsd)

find GEOM provider with given name

## NAME

**g\_provider\_by\_name** – find GEOM provider with given name

## SYNOPSIS

**#include \<geom/geom.h\>**

*struct g\_provider \**\

**g\_provider\_by\_name**(*const char \*name*);

## DESCRIPTION

The **g\_provider\_by\_name**() function searches for a provider called *name* and returns the structure *g\_provider* bound to it. Argument *name* should be a name, not a full path (i.e., “*da0*”, instead of “*/dev/da0*”).

## RESTRICTIONS/CONDITIONS

The topology lock has to be held.

## RETURN VALUES

The **g\_provider\_by\_name**() function returns a pointer to the provider called *name* or NULL if there is no such provider.

## SEE ALSO

[geom(4)](/geom/4.md), [DECLARE\_GEOM\_CLASS(9)](/DECLARE_GEOM_CLASS/9.md), [g\_access(9)](/g_access/9.md), [g\_attach(9)](/g_attach/9.md), [g\_bio(9)](/g_bio/9.md), [g\_consumer(9)](/g_consumer/9.md), [g\_data(9)](/g_data/9.md), [g\_event(9)](/g_event/9.md), [g\_geom(9)](/g_geom/9.md), [g\_provider(9)](/g_provider/9.md), [g\_wither\_geom(9)](/g_wither_geom/9.md)

## AUTHORS

This manual page was written by Pawel Jakub Dawidek ⟨*pjd@FreeBSD.org*⟩.
