1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-27 01:57:35 +03:00

fix: prefix of dmesg pstore files

A change in the kernel[1] renamed the prefix of the pstore files from
`dmesg-efi-` to `dmesg-efi_pstore-`.

[1]
https://git.kernel.org/linus/893c5f1de620
This commit is contained in:
Дамјан Георгиевски 2023-12-01 11:46:36 +01:00 committed by Luca Boccassi
parent 145dc0a0f6
commit ef87c84e81

View File

@ -227,7 +227,9 @@ static int process_dmesg_files(PStoreList *list) {
if (!startswith(pe->dirent.d_name, "dmesg-"))
continue;
if ((p = startswith(pe->dirent.d_name, "dmesg-efi-"))) {
/* The linux kernel changed the prefix from dmesg-efi- to dmesg-efi_pstore-
* so now we have to handle both cases. */
if ((p = STARTSWITH_SET(pe->dirent.d_name, "dmesg-efi-", "dmesg-efi_pstore-"))) {
/* For the EFI backend, the 3 least significant digits of record id encodes a
* "count" number, the next 2 least significant digits for the dmesg part
* (chunk) number, and the remaining digits as the timestamp. See