diff options
author | 2007-02-21 13:08:22 +0000 | |
---|---|---|
committer | 2007-02-21 13:08:22 +0000 | |
commit | 31c7d05f98c22ae1b3f7118061c1755ee3d484dd (patch) | |
tree | 79d1342574bd0887d51b878e52fb4e99c859d32f | |
parent | remove part of buf abuse and store errcnt in softc (instead of b_errcnt); more work can be done to lower buf abuse even more; miod@ testing and ok (diff) | |
download | wireguard-openbsd-31c7d05f98c22ae1b3f7118061c1755ee3d484dd.tar.xz wireguard-openbsd-31c7d05f98c22ae1b3f7118061c1755ee3d484dd.zip |
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@
-rw-r--r-- | sys/dev/pci/devlist2h.awk | 16 | ||||
-rw-r--r-- | 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 <dev/pci/pcivar.h> #ifdef PCIVERBOSE #include <dev/pci/pcidevs.h> +#include <dev/pci/pcidevs_data.h> #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 <dev/pci/pcidevs_data.h> -#endif /* PCIVERBOSE */ - const char * pci_findvendor(pcireg_t id_reg) { |