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