11553Srgrimes/*
21553Srgrimes * Copyright (c) 1980, 1993
31553Srgrimes *	The Regents of the University of California.  All rights reserved.
41553Srgrimes *
51553Srgrimes * Redistribution and use in source and binary forms, with or without
61553Srgrimes * modification, are permitted provided that the following conditions
71553Srgrimes * are met:
81553Srgrimes * 1. Redistributions of source code must retain the above copyright
91553Srgrimes *    notice, this list of conditions and the following disclaimer.
101553Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111553Srgrimes *    notice, this list of conditions and the following disclaimer in the
121553Srgrimes *    documentation and/or other materials provided with the distribution.
131553Srgrimes * 4. Neither the name of the University nor the names of its contributors
141553Srgrimes *    may be used to endorse or promote products derived from this software
151553Srgrimes *    without specific prior written permission.
161553Srgrimes *
171553Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181553Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191553Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201553Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211553Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221553Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231553Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241553Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251553Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261553Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271553Srgrimes * SUCH DAMAGE.
281553Srgrimes */
291553Srgrimes
301553Srgrimes#ifndef lint
3129451Scharnier#if 0
321553Srgrimesstatic char sccsid[] = "@(#)mkheaders.c	8.1 (Berkeley) 6/6/93";
3329451Scharnier#endif
3429451Scharnierstatic const char rcsid[] =
3550479Speter  "$FreeBSD$";
361553Srgrimes#endif /* not lint */
371553Srgrimes
381553Srgrimes/*
391553Srgrimes * Make all the .h files for the optional entries
401553Srgrimes */
411553Srgrimes
4229451Scharnier#include <ctype.h>
4329451Scharnier#include <err.h>
441553Srgrimes#include <stdio.h>
4520458Sjoerg#include <string.h>
4669004Simp#include <sys/param.h>
471553Srgrimes#include "config.h"
4816073Sphk#include "y.tab.h"
491553Srgrimes
5029451Scharniervoid
5161640Speterheaders(void)
521553Srgrimes{
5330796Sjoerg	struct device *dp;
54100461Speter	int errors;
551553Srgrimes
56100461Speter	errors = 0;
57110895Sru	STAILQ_FOREACH(dp, &dtab, d_next) {
58100461Speter		if (!(dp->d_done & DEVDONE)) {
59100461Speter			warnx("Error: device \"%s\" is unknown",
6071879Speter			       dp->d_name);
61100461Speter			       errors++;
62100461Speter			}
6347715Speter	}
64100461Speter	if (errors)
65100461Speter		errx(1, "%d errors", errors);
661553Srgrimes}
67