Hi

I am trying to get my laptop's config file as clean as possible
and one of the lines I experimented with is: 

controller      fdc0 at isa? disable port ? bio

(notice the lack of an "irq" and the wildcarding of "at isa").

This results in a line in ioconf.c of:

{ 10, &fdcdriver,     (null),     0, -1, C 0x00000,     0,   0,   0, 0x0000,    
 0,    0,       0,       0,      0,        0,   0 },

Notice the "(null)". I want the line in my config file to be like that
as I do not use the floppy drive very often, and I am quite content for
it to be kicked into action by pccardd when I plug it in. So my config
line above is just a device placeholder. The "(null)" causes a compile
failure, which is fixed by the kluge below. Is there a better way of
doing this, or is this OK to commit?

(WARNING! Cut 'n Paste alert!)
Index: mkioconf.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/config/mkioconf.c,v
retrieving revision 1.45
diff -u -d -r1.45 mkioconf.c
--- mkioconf.c  1998/11/15 18:07:35     1.45
+++ mkioconf.c  1999/02/04 06:38:37
@@ -721,7 +721,7 @@
                    mp == TO_NEXUS || !eq(mp->d_name, table))
                        continue;
                fprintf(fp, "{ -1, &%3sdriver, %8s,",
-                       mp->d_name, mp->d_port);
+                       mp->d_name, mp->d_port ? mp->d_port : "0");
                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,

-- 
Mark Murray
Join the anti-SPAM movement: http://www.cauce.org

To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to