G_PROVIDER_BY_NAME(9)

πŸ’– G_PROVIDER_BY_NAME(9) πŸ’–

okay bestie, so this is a page from the Kernel Developer's Manual β€” manual section 9, for all you kernel-coding girlies out there. Let's get into it ✨


🌸 NAME 🌸

g_provider_by_name β€” find a GEOM provider with a given name πŸ¦‹


✨ SYNOPSIS ✨

#include <geom/geom.h>

struct g_provider *
g_provider_by_name(const char *name);

πŸ’… DESCRIPTION πŸ’…

So the g_provider_by_name() function goes looking for a provider called name and hands you back the struct g_provider bound to it. no cap 🫢

and like, heads up: name should be an actual name, not a whole path. it's giving "da0", NOT "/dev/da0". the way that matters, fr fr πŸ™ˆ


πŸ”’ RESTRICTIONS/CONDITIONS πŸ”’

you have to be holding the topology lock. that's not a suggestion, that's the vibe check you cannot fail πŸ’€


⭐ RETURN VALUES ⭐

g_provider_by_name() returns a pointer to the provider called name, or NULL if there's literally no such provider. iconic behaviour honestly πŸ‘‘


🌈 SEE ALSO 🌈


πŸŽ€ AUTHORS πŸŽ€

This manual page was written by Pawel Jakub Dawidek <pjd@FreeBSD.org>. thank you king, we love a documented kernel API 🫢✨


and that's the whole page bestie, you ate that πŸ’…

Debian Β· January 16, 2004 Β· G_PROVIDER_BY_NAME(9) β€” ok bye, go write some GEOM code, mwah πŸŽ€πŸ’–πŸŒΈ

πŸ“¦ where this page comes from