diff options
author | grehan <grehan@FreeBSD.org> | 2004-12-28 05:07:49 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2004-12-28 05:07:49 +0000 |
commit | 4215504a99e3adfa0d45ee46c233cc63fe18e57d (patch) | |
tree | 8415336934516c04683b4389d674ff7bffd57791 /sys/dev/ofw | |
parent | afb327def21a34d762afe36dfed0158a7f80de26 (diff) | |
download | FreeBSD-src-4215504a99e3adfa0d45ee46c233cc63fe18e57d.zip FreeBSD-src-4215504a99e3adfa0d45ee46c233cc63fe18e57d.tar.gz |
Don't probe for a disk unless explicitly enabled by a tunable.
This allows boot to proceed on a real system until the issue
of calling back into certain OpenFirmware calls (e.g. finddevice)
in thread context is understood.
(this commit only affects psim users, of which I think I am the
only one...)
Diffstat (limited to 'sys/dev/ofw')
-rw-r--r-- | sys/dev/ofw/ofw_disk.c | 6 |
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; |