DECLARE_GEOM_CLASS - GEOM class declaration macro
The arguments to
DECLARE_GEOM_CLASS ();
are:
Structure Vt g_class contains data describing the class. They are:
Only a Fa name field is required; the rest are optional.
static struct g_geom *
g_example_taste(struct g_class *mp, struct g_provider *pp,
int flags __unused)
{
g_topology_assert();
[...]
}
static void
g_example_ctlreq(struct gctl_req *req, struct g_class *cp,
char const *verb)
{
[...]
}
static int
g_example_destroy_geom(struct gctl_req *req, struct g_class *cp,
struct g_geom *gp)
{
g_topology_assert();
[...]
}
static void
g_example_init(struct g_class *mp)
{
[...]
}
static void
g_example_fini(struct g_class *mp)
{
[...]
}
struct g_class example_class = {
.name = "EXAMPLE",
.taste = g_example_taste,
.ctlreq = g_example_ctlreq,
.init = g_example_init,
.fini = g_example_fini,
.destroy_geom = g_example_destroy_geom
};
DECLARE_GEOM_CLASS(example_class, g_example);
|
Закладки на сайте Проследить за страницей |
Created 1996-2026 by Maxim Chirkov Добавить новость, Поддержать |