diff options
author | Kazutaka YOKOTA <yokota@FreeBSD.org> | 1999-07-24 09:35:21 +0000 |
---|---|---|
committer | Kazutaka YOKOTA <yokota@FreeBSD.org> | 1999-07-24 09:35:21 +0000 |
commit | 828cb0403d4b295fe15a4802aae84c22e83c9826 (patch) | |
tree | 96056f17dd7e0e6a9cdcd4fe870dda62e9ee2ea4 /sys/isa/isahint.c | |
parent | f1550d9d413b524e8946226e8895c7c2be085aae (diff) | |
download | src-828cb0403d4b295fe15a4802aae84c22e83c9826.tar.gz src-828cb0403d4b295fe15a4802aae84c22e83c9826.zip |
Do not print resource values which are not set.
Reviewed by: dfr
Notes
Notes:
svn path=/head/; revision=49048
Diffstat (limited to 'sys/isa/isahint.c')
-rw-r--r-- | sys/isa/isahint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/isa/isahint.c b/sys/isa/isahint.c index 25e6d84a42fb..31323ccfaaa1 100644 --- a/sys/isa/isahint.c +++ b/sys/isa/isahint.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: isahint.c,v 1.2 1999/05/22 15:18:26 dfr Exp $ + * $Id: isahint.c,v 1.3 1999/05/28 09:25:00 dfr Exp $ */ #include <sys/param.h> @@ -57,22 +57,22 @@ isahint_add_device(device_t parent, const char *name, int unit) start = 0; count = 0; - if (resource_int_value(name, unit, "port", &start) == 0 - || resource_int_value(name, unit, "portsize", &count) == 0) + if ((resource_int_value(name, unit, "port", &start) == 0 && start > 0) + || (resource_int_value(name, unit, "portsize", &count) == 0 && count > 0)) ISA_SET_RESOURCE(parent, child, SYS_RES_IOPORT, 0, start, count); start = 0; count = 0; - if (resource_int_value(name, unit, "maddr", &start) == 0 - || resource_int_value(name, unit, "msize", &count) == 0) + if ((resource_int_value(name, unit, "maddr", &start) == 0 && start > 0) + || (resource_int_value(name, unit, "msize", &count) == 0 && count > 0)) ISA_SET_RESOURCE(parent, child, SYS_RES_MEMORY, 0, start, count); - if (resource_int_value(name, unit, "irq", &start) == 0) + if (resource_int_value(name, unit, "irq", &start) == 0 && start > 0) ISA_SET_RESOURCE(parent, child, SYS_RES_IRQ, 0, start, 1); - if (resource_int_value(name, unit, "drq", &start) == 0) + if (resource_int_value(name, unit, "drq", &start) == 0 && start > 0) ISA_SET_RESOURCE(parent, child, SYS_RES_DRQ, 0, start, 1); if (resource_int_value(name, unit, "flags", &t) == 0) |