diff options
-rw-r--r-- | usr.sbin/config/config.h | 2 | ||||
-rw-r--r-- | usr.sbin/config/config.y | 3 | ||||
-rw-r--r-- | usr.sbin/config/mkheaders.c | 11 | ||||
-rw-r--r-- | usr.sbin/config/mkmakefile.c | 4 |
4 files changed, 6 insertions, 14 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 5a98de2..3542349 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -75,7 +75,7 @@ struct file_list { #define ISDUP 32 struct device { - int d_type; /* DEVICE, bus adaptor */ + int d_done; /* processed */ char *d_name; /* name of device (e.g. rk11) */ int d_count; /* device count */ #define QUES -1 /* -1 means '?' */ diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 2ae1058..5fe6ff6 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -277,7 +277,6 @@ Device_spec: op->op_line = yyline; opt = op; /* and the device part */ - cur.d_type = DEVICE; cur.d_name = $2; cur.d_count = UNKNOWN; } | @@ -291,7 +290,6 @@ Device_spec: op->op_line = yyline; opt = op; /* and the device part */ - cur.d_type = DEVICE; cur.d_name = $2; cur.d_count = $3; if (cur.d_count == 0) @@ -319,7 +317,6 @@ newdev(struct device *dp) memset(np, 0, sizeof(*np)); *np = *dp; np->d_name = dp->d_name; - np->d_type = dp->d_type; np->d_count = dp->d_count; np->d_next = 0; if (curp == 0) diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c index 3c8e879..26240e2 100644 --- a/usr.sbin/config/mkheaders.c +++ b/usr.sbin/config/mkheaders.c @@ -68,8 +68,7 @@ headers(void) for (dp = dtab; dp != 0; dp = dp->d_next) { if (eq(dp->d_name, fl->f_needs)) { match++; - if ((dp->d_type & TYPEMASK) == DEVICE) - dp->d_type |= DEVDONE; + dp->d_done |= DEVDONE; } } if (fl->f_flags & NEED_COUNT) @@ -77,11 +76,9 @@ headers(void) } } for (dp = dtab; dp != 0; dp = dp->d_next) { - if ((dp->d_type & TYPEMASK) == DEVICE) { - if (!(dp->d_type & DEVDONE)) - errx(1, "Error: device \"%s\" is unknown", - dp->d_name); - } + if (!(dp->d_done & DEVDONE)) + errx(1, "Error: device \"%s\" is unknown", + dp->d_name); } } diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 5dc889c..13af644 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -480,8 +480,7 @@ nextparam: goto invis; for (dp = dtab; dp != 0; save_dp = dp, dp = dp->d_next) if (eq(dp->d_name, wd)) { - if (std && dp->d_type == DEVICE && - dp->d_count <= 0) + if (std && dp->d_count <= 0) dp->d_count = 1; goto nextparam; } @@ -493,7 +492,6 @@ nextparam: if (std) { dp = (struct device *) malloc(sizeof *dp); bzero(dp, sizeof *dp); - dp->d_type = DEVICE; dp->d_name = ns(wd); dp->d_count = 1; save_dp->d_next = dp; |