summaryrefslogtreecommitdiff
path: root/sys/dev/usb/devlist2h.awk
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-27 04:02:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-27 04:02:11 +0000
commitf2da1011abf4f49badb38104c86b1b6e5c456994 (patch)
treed58421bbe8fad8bf4e96c62dfc02ef4b7628d930 /sys/dev/usb/devlist2h.awk
parent4646a15c8dc06936079f6763c94ac8b2f02d7da1 (diff)
re-arrange tables as pcidevs was changed; huge space savings
Diffstat (limited to 'sys/dev/usb/devlist2h.awk')
-rw-r--r--sys/dev/usb/devlist2h.awk32
1 files changed, 9 insertions, 23 deletions
diff --git a/sys/dev/usb/devlist2h.awk b/sys/dev/usb/devlist2h.awk
index 9320d9a4bf8..ff4dbc1b863 100644
--- a/sys/dev/usb/devlist2h.awk
+++ b/sys/dev/usb/devlist2h.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $OpenBSD: devlist2h.awk,v 1.4 1999/12/26 15:00:47 fgsch Exp $
+# $OpenBSD: devlist2h.awk,v 1.5 2001/01/27 04:02:10 deraadt Exp $
# $NetBSD: devlist2h.awk,v 1.8 1999/11/18 23:32:25 augustss Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -175,28 +175,12 @@ END {
printf("\n") > dfile
- printf("struct usb_knowndev usb_knowndevs[] = {\n") > dfile
+ printf("struct usb_known_product usb_known_products[] = {\n") > dfile
for (i = 1; i <= nproducts; i++) {
printf("\t{\n") > dfile
printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n",
products[i, 1], products[i, 1], products[i, 2]) \
> dfile
- printf("\t ") > dfile
- printf("0") > dfile
- printf(",\n") > dfile
-
- vendi = vendorindex[products[i, 1]];
- printf("\t \"") > dfile
- j = 3;
- needspace = 0;
- while (vendors[vendi, j] != "") {
- if (needspace)
- printf(" ") > dfile
- printf("%s", vendors[vendi, j]) > dfile
- needspace = 1
- j++
- }
- printf("\",\n") > dfile
printf("\t \"") > dfile
j = 4;
@@ -211,12 +195,15 @@ END {
printf("\",\n") > dfile
printf("\t},\n") > dfile
}
+ printf("\t{ 0, 0, NULL }\n") > dfile
+ printf("};\n\n") > dfile
+
+ printf("struct usb_known_vendor usb_known_vendors[] = {\n") > dfile
for (i = 1; i <= nvendors; i++) {
printf("\t{\n") > dfile
- printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) \
- > dfile
- printf("\t USB_KNOWNDEV_NOPROD,\n") \
+ printf("\t USB_VENDOR_%s,\n", vendors[i, 1]) \
> dfile
+
printf("\t \"") > dfile
j = 3;
needspace = 0;
@@ -228,9 +215,8 @@ END {
j++
}
printf("\",\n") > dfile
- printf("\t NULL,\n") > dfile
printf("\t},\n") > dfile
}
- printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile
+ printf("\t{ 0, NULL }\n") > dfile
printf("};\n") > dfile
}