diff --git a/sys/i386/i386/math_emulate.c b/sys/i386/i386/math_emulate.c index df44b5f75182..743442b644ac 100644 --- a/sys/i386/i386/math_emulate.c +++ b/sys/i386/i386/math_emulate.c @@ -6,7 +6,7 @@ * [expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj] * * from: 386BSD 0.1 - * $Id: math_emulate.c,v 1.27 1998/07/15 09:01:18 bde Exp $ + * $Id: math_emulate.c,v 1.28 1998/10/16 03:54:59 peter Exp $ */ /* @@ -1576,10 +1576,13 @@ fpu_modevent(module_t mod, modeventtype_t type, void *unused) { switch (type) { case MOD_LOAD: - if (pmath_emulate) + if (pmath_emulate) { printf("Another Math emulator already present\n"); - else - pmath_emulate = math_emulate; + return EBUSY; + } + pmath_emulate = math_emulate; + if (bootverbose) + printf("Math emulator present\n"); break; case MOD_UNLOAD: if (pmath_emulate != math_emulate) { @@ -1587,6 +1590,9 @@ fpu_modevent(module_t mod, modeventtype_t type, void *unused) return EACCES; } pmath_emulate = 0; + if (bootverbose) + printf("Math emulator unloaded\n"); + break; default: break; } @@ -1597,6 +1603,6 @@ moduledata_t fpumod = { fpu_modevent, 0 }; -DECLARE_MODULE(fpu, fpumod, SI_SUB_PSEUDO, SI_ORDER_ANY); +DECLARE_MODULE(fpu, fpumod, SI_SUB_DRIVERS, SI_ORDER_ANY); #endif /* LKM */