2017-05-01 00:26:56 +00:00
|
|
|
#!/usr/bin/env python3
|
2021-10-17 07:46:19 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2015-05-19 23:35:02 +00:00
|
|
|
|
2023-11-14 20:46:12 +00:00
|
|
|
from csv import reader
|
2015-05-19 23:35:02 +00:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
def read_table(a):
|
|
|
|
|
2023-11-14 20:46:12 +00:00
|
|
|
table = []
|
2015-05-19 23:35:02 +00:00
|
|
|
|
2023-11-14 20:46:12 +00:00
|
|
|
with open(a, newline='') as csvfile:
|
|
|
|
for row in reader(csvfile):
|
|
|
|
if row[0] == "Company":
|
|
|
|
# Skip header
|
|
|
|
continue
|
|
|
|
table.append(row)
|
2015-05-19 23:35:02 +00:00
|
|
|
|
2023-11-14 20:46:12 +00:00
|
|
|
table.sort(key=lambda x: x[1])
|
2015-05-19 23:35:02 +00:00
|
|
|
|
2023-11-14 20:46:12 +00:00
|
|
|
for row in table:
|
|
|
|
# Some IDs end with whitespace, while they didn't in the old HTML table, so it's probably
|
|
|
|
# a mistake, strip it.
|
|
|
|
print("\nacpi:{0}*:\n ID_VENDOR_FROM_DATABASE={1}".format(row[1].strip(), row[0].strip()))
|
2015-05-19 23:35:02 +00:00
|
|
|
|
|
|
|
print('# This file is part of systemd.\n'
|
|
|
|
'#\n'
|
|
|
|
'# Data imported from:\n'
|
Update UEFI URLs (#12260)
* Use more secure https://www.uefi.org
http://www.uefi.org directs to https://uefi.org/, so this saves one
redirect.
$ curl -I http://www.uefi.org
HTTP/1.1 302 Found
Server: nginx
Date: Tue, 09 Apr 2019 14:54:46 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
X-Content-Type-Options: nosniff
Location: https://uefi.org/
Cache-Control: max-age=1209600
Expires: Tue, 23 Apr 2019 14:54:46 GMT
Run the command below to update all occurrences.
git grep -l http://www.uefi.org | xargs sed -i 's,http://www.uefi.org,https://www.uefi.org,'
* Use https://uefi.org to save redirect
Save one redirect by using the target location.
$ curl -I https://www.uefi.org
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Tue, 09 Apr 2019 14:55:42 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
X-Content-Type-Options: nosniff
Location: https://uefi.org/
Cache-Control: max-age=1209600
Expires: Tue, 23 Apr 2019 14:55:42 GMT
Run the command below to update all occurrences.
git grep -l https://www.uefi.org | xargs sed -i 's,https://www.uefi.org,https://uefi.org,'
2019-04-09 16:37:46 +00:00
|
|
|
'# https://uefi.org/uefi-pnp-export\n'
|
|
|
|
'# https://uefi.org/uefi-acpi-export')
|
2015-05-19 23:35:02 +00:00
|
|
|
|
2023-11-15 14:21:26 +00:00
|
|
|
read_table('acpi_id_registry.csv')
|
|
|
|
read_table('pnp_id_registry.csv')
|