Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vt/hw/ofwfb/ofwfb.c
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
static struct ofwfb_softc ofwfb_conssoftc; | static struct ofwfb_softc ofwfb_conssoftc; | ||||
VT_DRIVER_DECLARE(vt_ofwfb, vt_ofwfb_driver); | VT_DRIVER_DECLARE(vt_ofwfb, vt_ofwfb_driver); | ||||
static int | static int | ||||
ofwfb_probe(struct vt_device *vd) | ofwfb_probe(struct vt_device *vd) | ||||
{ | { | ||||
int disabled; | |||||
phandle_t chosen, node; | phandle_t chosen, node; | ||||
ihandle_t stdout; | ihandle_t stdout; | ||||
char buf[64]; | char buf[64]; | ||||
disabled = 0; | |||||
TUNABLE_INT_FETCH("hw.ofwfb.disable", &disabled); | |||||
if (disabled) | |||||
return (CN_DEAD); | |||||
chosen = OF_finddevice("/chosen"); | chosen = OF_finddevice("/chosen"); | ||||
if (chosen == -1) | if (chosen == -1) | ||||
return (CN_DEAD); | return (CN_DEAD); | ||||
node = -1; | node = -1; | ||||
if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == | if (OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)) == | ||||
sizeof(stdout)) | sizeof(stdout)) | ||||
▲ Show 20 Lines • Show All 428 Lines • Show Last 20 Lines |