2 # SPDX-License-Identifier: LGPL-2.1-or-later
6 # pylint: disable=consider-using-with
8 def read_table(filename
):
9 table
= list(reader(open(filename
, newline
='')))
10 table
= table
[1:] # Skip header
11 table
.sort(key
=lambda x
: x
[1])
14 # Some IDs end with whitespace, while they didn't in the old HTML table, so it's probably
15 # a mistake, strip it.
16 print(f
'\nacpi:{row[1].strip()}*:\n ID_VENDOR_FROM_DATABASE={row[0].strip()}')
19 # This file is part of systemd.
22 # https://uefi.org/uefi-pnp-export
23 # https://uefi.org/uefi-acpi-export''')
25 read_table('acpi_id_registry.csv')
26 read_table('pnp_id_registry.csv')