Commit be15035d authored by Hans de Goede's avatar Hans de Goede Committed by Josh Boyer
Browse files

check_whence.py: Add support for filenames with spaces in them



Some vendors save a couple of cents by not including an eeprom for
wifi parameters on their boards. Instead the driver loads these board
specific parameters through the request_firmware mechanism.

Since these are board specific the filenames also must be board specific,
on x86 DMI strings are used for this and the wifi chipname is postfixed
with $sys_vendor-$product_name from the DMI tables. These DMi variables
may contain spaces.

This commit adds support to check_whence.py for filenames with spaces
in them, after this commit these can be specified by putting double-quotes
around them, e.g "name with spaces.bin".
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarJosh Boyer <jwboyer@kernel.org>
parent e6b9001e
...@@ -5,6 +5,10 @@ import os, re, sys ...@@ -5,6 +5,10 @@ import os, re, sys
def list_whence(): def list_whence():
with open('WHENCE') as whence: with open('WHENCE') as whence:
for line in whence: for line in whence:
match = re.match(r'(?:File|Link|Source):\s*"(.*)"', line)
if match:
yield match.group(1)
continue
match = re.match(r'(?:File|Link|Source):\s*(\S*)', line) match = re.match(r'(?:File|Link|Source):\s*(\S*)', line)
if match: if match:
yield match.group(1) yield match.group(1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment