diff options
author | Simon Rettberg | 2022-07-07 19:20:03 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-07-07 19:20:03 +0200 |
commit | 6485e28e4f46997c9a4da5556fc6a5c297c324a8 (patch) | |
tree | 163c136ede09ff0c4255d1f4f7878356c97ccdf7 /modules-available/statistics/inc | |
parent | [statistics] Decode SPD JEDEC manufacturer IDs (diff) | |
download | slx-admin-6485e28e4f46997c9a4da5556fc6a5c297c324a8.tar.gz slx-admin-6485e28e4f46997c9a4da5556fc6a5c297c324a8.tar.xz slx-admin-6485e28e4f46997c9a4da5556fc6a5c297c324a8.zip |
[statistics] Add support for yet another JEDEC encoding scheme
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r-- | modules-available/statistics/inc/hardwareparser.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php index 2afd0564..0bad832f 100644 --- a/modules-available/statistics/inc/hardwareparser.inc.php +++ b/modules-available/statistics/inc/hardwareparser.inc.php @@ -44,7 +44,9 @@ class HardwareParser public static function decodeJedec(string $string): string { // JEDEC ID:7F 7F 9E 00 00 00 00 00 - if (preg_match('/JEDEC(?:\s*ID)?\s*:\s*([0-9a-f\s]+)/i', $string, $out)) { + // or the ID as 8 hex digits with no spacing and prefix + if (preg_match('/JEDEC(?:\s*ID)?\s*:?\s*([0-9a-f\s]+)/i', $string, $out) + || preg_match('/^([0-9a-f]{14}00)$/i', $string, $out)) { preg_match_all('/[0-9a-f]{2}/i', $out[1], $out); $bank = 0; $id = 0; |