From 9872eac08f83b189fadd92483bd3e5948d2e0dfd Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Wed, 21 Feb 2007 13:08:23 +0000 Subject: put the structs defining the content of pcidevs_data.h into that header file, rather than in pci_subr.c before theyre used. this allows the header to be used elsewhere without needing to copy a chunk out of pci_subr.c. ok miod@ deraadt@ --- sys/dev/pci/devlist2h.awk | 16 ++++++++++++++-- sys/dev/pci/pci_subr.c | 21 ++------------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/sys/dev/pci/devlist2h.awk b/sys/dev/pci/devlist2h.awk index 58588c55c09..c15a3e125a5 100644 --- a/sys/dev/pci/devlist2h.awk +++ b/sys/dev/pci/devlist2h.awk @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $OpenBSD: devlist2h.awk,v 1.6 2001/01/27 01:19:11 deraadt Exp $ +# $OpenBSD: devlist2h.awk,v 1.7 2007/02/21 13:08:22 dlg Exp $ # $NetBSD: devlist2h.awk,v 1.2 1996/01/22 21:08:09 cgd Exp $ # # Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -45,7 +45,19 @@ NR == 1 { printf(" *\n") > dfile printf(" * generated from:\n") > dfile printf(" *\t%s\n", VERSION) > dfile - printf(" */\n") > dfile + printf(" */\n\n") > dfile + + printf("/* Descriptions of known vendors and devices. */\n") > dfile + printf("struct pci_known_vendor {\n") > dfile + printf("\tpci_vendor_id_t vendor;\n") > dfile + printf("\tconst char *vendorname;\n") > dfile + printf("};\n\n") > dfile + + printf("struct pci_known_product {\n") > dfile + printf("\tpci_vendor_id_t vendor;\n") > dfile + printf("\tpci_product_id_t product;\n") > dfile + printf("\tconst char *productname;\n") > dfile + printf("};\n\n") > dfile printf("/*\n") > hfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 5fc0be8093a..d6010180b87 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_subr.c,v 1.20 2007/01/02 19:22:38 mbalmer Exp $ */ +/* $OpenBSD: pci_subr.c,v 1.21 2007/02/21 13:08:22 dlg Exp $ */ /* $NetBSD: pci_subr.c,v 1.19 1996/10/13 01:38:29 christos Exp $ */ /* @@ -43,6 +43,7 @@ #include #ifdef PCIVERBOSE #include +#include #endif /* @@ -275,24 +276,6 @@ const struct pci_class pci_class[] = { { 0 }, }; -#ifdef PCIVERBOSE -/* - * Descriptions of known vendors and devices ("products"). - */ -struct pci_known_vendor { - pci_vendor_id_t vendor; - const char *vendorname; -}; - -struct pci_known_product { - pci_vendor_id_t vendor; - pci_product_id_t product; - const char *productname; -}; - -#include -#endif /* PCIVERBOSE */ - const char * pci_findvendor(pcireg_t id_reg) { -- cgit v1.2.3