summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1999-02-04 10:24:45 +0000
committermarkm <markm@FreeBSD.org>1999-02-04 10:24:45 +0000
commitaf4b14e3cfe93ff91d01a38c7c0059105526cfcf (patch)
treed8ad5279522bfefb36746b0a281eb5f1a5507de2 /usr.sbin
parent01d48664122f1a02ab265b8f2b0e7234d46c3249 (diff)
downloadFreeBSD-src-af4b14e3cfe93ff91d01a38c7c0059105526cfcf.zip
FreeBSD-src-af4b14e3cfe93ff91d01a38c7c0059105526cfcf.tar.gz
Fix the handling of certain devices.
Previously the foolowing lines would have broken: controller fdc0 at isa? disable port ? bio controller fdc0 at isa? disable port 0x100 bio While this would work: controller fdc0 at isa? disable port "IO_FD1" bio The first of the three lines is useful for making placeholder devices for PCMCIA-floppies, and the second is useful for non-standard hardware. The failure is a "(null)" string in ioconf.c that the compiler pukes on. Thanks to: Bruce Evans (bde@freebsd.org)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/mkioconf.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c
index 27053a7..8f3cd83 100644
--- a/usr.sbin/config/mkioconf.c
+++ b/usr.sbin/config/mkioconf.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)mkioconf.c 8.2 (Berkeley) 1/21/94";
#endif
static const char rcsid[] =
- "$Id: mkioconf.c,v 1.44 1998/10/23 17:05:06 bde Exp $";
+ "$Id: mkioconf.c,v 1.45 1998/11/15 18:07:35 dfr Exp $";
#endif /* not lint */
#include <err.h>
@@ -720,8 +720,14 @@ isa_biotab(fp, table)
if (dp->d_unit == QUES || mp == 0 ||
mp == TO_NEXUS || !eq(mp->d_name, table))
continue;
- fprintf(fp, "{ -1, &%3sdriver, %8s,",
- mp->d_name, mp->d_port);
+ fprintf(fp, "{ -1, &%3sdriver, ",
+ mp->d_name);
+ if (mp->d_port)
+ fprintf(fp, " %8s,", mp->d_port);
+ else if (mp->d_portn == -1)
+ fprintf(fp, " %d,", mp->d_portn);
+ else
+ fprintf(fp, " 0x%04x,", mp->d_portn);
fprintf(fp, "%6s, %2d, C 0x%05X, %5d, 0, %3d, 0x%04X, %5d, 0, 0, 0, %6d, %8d, 0 },\n",
sirq(mp->d_irq), mp->d_drq, mp->d_maddr,
mp->d_msize, dp->d_unit,
OpenPOWER on IntegriCloud