diff options
author | Mantas Mikulėnas <grawity@gmail.com> | 2012-12-06 23:34:25 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-12-06 22:42:09 +0100 |
commit | f9cd22249dbdcebe2ab54eea56c0b32e2a1c2ce5 (patch) | |
tree | 29a087f9b1f5eee61ae816cce3d16aa4341ed6c1 /hwdb/ids-update.pl | |
parent | 7b683869dcb8b9a821e898e2d672ef8883373881 (diff) |
hwdb: ids-update: close the right file handles
The script was closing *INP and *OUTP, which never actually existed.
Also fix pci_vendor() opening usb.ids and immediately discarding the fh.
Diffstat (limited to 'hwdb/ids-update.pl')
-rwxr-xr-x | hwdb/ids-update.pl | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/hwdb/ids-update.pl b/hwdb/ids-update.pl index 869c49b86..9ab754c64 100755 --- a/hwdb/ids-update.pl +++ b/hwdb/ids-update.pl @@ -34,8 +34,8 @@ sub usb_vendor { } } - close(INP); - close(OUTP); + close(IN); + close(OUT); } sub usb_classes { @@ -100,15 +100,14 @@ sub usb_classes { } } - close(INP); - close(OUTP); + close(IN); + close(OUT); } sub pci_vendor { my $vendor; my $device; - open(IN, "<", "usb.ids"); open(IN, "<", "pci.ids"); open(OUT, ">", "20-pci-vendor-product.hwdb"); print(OUT "# This file is part of systemd.\n" . @@ -149,8 +148,8 @@ sub pci_vendor { } } - close(INP); - close(OUTP); + close(IN); + close(OUT); } sub pci_classes { @@ -203,8 +202,8 @@ sub pci_classes { } } - close(INP); - close(OUTP); + close(IN); + close(OUT); } sub oui { @@ -237,7 +236,7 @@ sub oui { print(OUT " ID_OUI_FROM_DATABASE=" . $text . "\n"); } } - close(INP); + close(IN); open(IN, "<", "oui.txt"); while (my $line = <IN>) { @@ -255,8 +254,8 @@ sub oui { } } } - close(INP); - close(OUTP); + close(IN); + close(OUT); } usb_vendor(); |