ids-update.pl revision 09d8f5d757515122d7b726218e249621e564157c
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering open(OUT, ">", "20-usb-vendor-product.hwdb");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT "# This file is part of systemd.\n" .
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering "# Data imported and updated from: http://www.linux-usb.org/usb.ids\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering if (defined $1) {
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT " ID_VENDOR_FROM_DATABASE=" . $text . "\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering if (defined $1) {
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT "usb:v" . $vendor . "p" . $product . "*\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT " ID_PRODUCT_FROM_DATABASE=" . $text . "\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT "# This file is part of systemd.\n" .
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering "# Data imported and updated from: http://www.linux-usb.org/usb.ids\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering if (defined $1) {
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT "usb:v*p*d*dc" . $class . "*\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering print(OUT " ID_USB_CLASS_FROM_DATABASE=" . $text . "\n");
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering if (not defined $class) {
78f22b973fa2c9b09bd974680836df17163d9ee0Lennart Poettering } elsif ($line =~ m/^$/) {
close(INP);
close(OUTP);
sub pci_vendor {
my $vendor;
my $device;
"# Data imported and updated from: http://pciids.sourceforge.net/v2.2/pci.ids\n");
$line =~ s/\s+$//;
print(OUT "pci:v0000" . $vendor . "d0000" . $device . "sv0000" . $sub_vendor . "sd0000" . $sub_device . "*\n");
close(INP);
close(OUTP);
sub pci_classes {
my $class;
my $subclass;
my $interface;
"# Data imported and updated from: http://pciids.sourceforge.net/v2.2/pci.ids\n");
$line =~ s/\s+$//;
if (not defined $class) {
} elsif ($line =~ m/^$/) {
close(INP);
close(OUTP);
sub oui {
"# Data imported and updated from: http://standards.ieee.org/develop/regauth/oui/oui.txt\n");
$line =~ s/\s+$//;
close(INP);
close(OUTP);
usb_vendor();
usb_classes();
pci_vendor();
pci_classes();
oui();