X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=hwdb%2Fids-update.pl;h=3e0c14b0b2519e88f35b2756e75f66c4e265b499;hp=d157040debb628eb0ca4964f8badab6732ea8d05;hb=448004c340d41f1b7eb3c06cbd694b8862e6524d;hpb=796b06c21b62d13c9021e2fbd9c58a5c6edb2764 diff --git a/hwdb/ids-update.pl b/hwdb/ids-update.pl index d157040de..3e0c14b0b 100755 --- a/hwdb/ids-update.pl +++ b/hwdb/ids-update.pl @@ -78,3 +78,23 @@ while (my $line = ) { } close(INP); close(OUTP); + +open(IN, "<", "oui.txt"); +open(OUT, ">", "20-OUI-vendor.hwdb"); +print(OUT "# This file is part of systemd.\n" . + "#\n" . + "# Data imported and updated from: http://standards.ieee.org/develop/regauth/oui/oui.txt\n"); + +while (my $line = ) { + $line =~ s/\s+$//; + $line =~ m/^([0-9A-F]{6})\s*\(base 16\)\s*(.*)$/; + if (defined $1) { + my $vendor = uc $1; + my $text = $2; + print(OUT "\n"); + print(OUT "OUI:" . $vendor . "\n"); + print(OUT " ID_VENDOR_FROM_DATABASE=" . $text . "\n"); + } +} +close(INP); +close(OUTP);