From: Дамјан Георгиевски Date: Fri, 1 Dec 2023 10:46:36 +0000 (+0100) Subject: fix: prefix of dmesg pstore files X-Git-Tag: v255-rc4~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef87c84e812cbdca4ef160fb0536d1f1bc6a2400;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c index 3c1d9bd74b2..8f32a0a2ae1 100644 --- a/src/pstore/pstore.c +++ b/src/pstore/pstore.c @@ -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