summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-08-08 06:49:07 +0000
committerphk <phk@FreeBSD.org>2004-08-08 06:49:07 +0000
commit8a11f1b4a6e444c06beac9b61cd820cf6b82516f (patch)
tree93b8d93d433b81dc0f847a70e6344dafaeccf6d8 /sys/geom/geom_disk.c
parentcb84366718580d5c3c1cdea1706a0c06eea5d876 (diff)
downloadFreeBSD-src-8a11f1b4a6e444c06beac9b61cd820cf6b82516f.zip
FreeBSD-src-8a11f1b4a6e444c06beac9b61cd820cf6b82516f.tar.gz
Use default method initialization on geoms.
Diffstat (limited to 'sys/geom/geom_disk.c')
-rw-r--r--sys/geom/geom_disk.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 6b83173..eed2bda 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -61,11 +61,18 @@ static struct mtx g_disk_done_mtx;
static g_access_t g_disk_access;
static g_init_t g_disk_init;
static g_fini_t g_disk_fini;
+static g_start_t g_disk_start;
+static g_ioctl_t g_disk_ioctl;
+static g_dumpconf_t g_disk_dumpconf;
struct g_class g_disk_class = {
.name = "DISK",
.init = g_disk_init,
.fini = g_disk_fini,
+ .start = g_disk_start,
+ .access = g_disk_access,
+ .ioctl = g_disk_ioctl,
+ .dumpconf = g_disk_dumpconf,
};
static void
@@ -334,11 +341,7 @@ g_disk_create(void *arg, int flag)
g_topology_assert();
dp = arg;
gp = g_new_geomf(&g_disk_class, "%s%d", dp->d_name, dp->d_unit);
- gp->start = g_disk_start;
- gp->access = g_disk_access;
- gp->ioctl = g_disk_ioctl;
gp->softc = dp;
- gp->dumpconf = g_disk_dumpconf;
pp = g_new_providerf(gp, "%s", gp->name);
pp->mediasize = dp->d_mediasize;
pp->sectorsize = dp->d_sectorsize;
OpenPOWER on IntegriCloud