summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ofw/ofw_disk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/ofw/ofw_disk.c b/sys/dev/ofw/ofw_disk.c
index 54a3d2a..67a9451 100644
--- a/sys/dev/ofw/ofw_disk.c
+++ b/sys/dev/ofw/ofw_disk.c
@@ -73,6 +73,9 @@ struct g_class g_ofwd_class = {
DECLARE_GEOM_CLASS(g_ofwd_class, g_ofwd);
+static int ofwd_enable = 0;
+TUNABLE_INT("kern.ofw.disk", &ofwd_enable);
+
static int
ofwd_startio(struct ofwd_softc *sc, struct bio *bp)
{
@@ -139,6 +142,9 @@ g_ofwd_init(struct g_class *mp __unused)
ihandle_t ifd;
int error;
+ if (ofwd_enable == 0)
+ return;
+
ofd = OF_finddevice("ofwdisk");
if (ofd == -1)
return;
OpenPOWER on IntegriCloud