From d6c789c07aaf61cbf084c231c08c55cfcfb4fc08 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 18 Apr 1999 15:10:58 +0000 Subject: [PATCH] Add support for 'disabled' probe hint. --- sys/i386/apm/apm.c | 8 ++++++-- sys/i386/bios/apm.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index 359e99e49896..3de9481947c4 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.77 1998/12/10 23:36:14 msmith Exp $ + * $Id: apm.c,v 1.78 1999/04/16 21:22:05 peter Exp $ */ #include "opt_devfs.h" @@ -648,7 +648,11 @@ apm_probe(device_t dev) struct vm86frame vmf; int i; #endif - int flags; + int disabled, flags; + + if (resource_int_value("apm", 0, "disabled", &disabled) == 0 + && disabled != 0) + return ENXIO; device_set_desc(dev, "APM BIOS"); diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 359e99e49896..3de9481947c4 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -15,7 +15,7 @@ * * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * - * $Id: apm.c,v 1.77 1998/12/10 23:36:14 msmith Exp $ + * $Id: apm.c,v 1.78 1999/04/16 21:22:05 peter Exp $ */ #include "opt_devfs.h" @@ -648,7 +648,11 @@ apm_probe(device_t dev) struct vm86frame vmf; int i; #endif - int flags; + int disabled, flags; + + if (resource_int_value("apm", 0, "disabled", &disabled) == 0 + && disabled != 0) + return ENXIO; device_set_desc(dev, "APM BIOS");