Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/geom_redboot.c
Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | again: | ||||
g_access(cp, -1, 0, 0); | g_access(cp, -1, 0, 0); | ||||
if (LIST_EMPTY(&gp->provider)) { | if (LIST_EMPTY(&gp->provider)) { | ||||
g_slice_spoiled(cp); | g_slice_spoiled(cp); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
return (gp); | return (gp); | ||||
} | } | ||||
static void | |||||
g_redboot_config(struct gctl_req *req, struct g_class *mp, const char *verb) | |||||
{ | |||||
struct g_geom *gp; | |||||
g_topology_assert(); | |||||
gp = gctl_get_geom(req, mp, "geom"); | |||||
if (gp == NULL) | |||||
return; | |||||
gctl_error(req, "Unknown verb"); | |||||
} | |||||
static struct g_class g_redboot_class = { | static struct g_class g_redboot_class = { | ||||
.name = REDBOOT_CLASS_NAME, | .name = REDBOOT_CLASS_NAME, | ||||
.version = G_VERSION, | .version = G_VERSION, | ||||
.taste = g_redboot_taste, | .taste = g_redboot_taste, | ||||
.dumpconf = g_redboot_dumpconf, | .dumpconf = g_redboot_dumpconf, | ||||
.ctlreq = g_redboot_config, | |||||
.ioctl = g_redboot_ioctl, | .ioctl = g_redboot_ioctl, | ||||
}; | }; | ||||
DECLARE_GEOM_CLASS(g_redboot_class, g_redboot); | DECLARE_GEOM_CLASS(g_redboot_class, g_redboot); | ||||
MODULE_VERSION(geom_redboot, 0); | MODULE_VERSION(geom_redboot, 0); |