Skip to content

Commit ef87c84

Browse files
gdamjanbluca
authored andcommitted
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
1 parent 145dc0a commit ef87c84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pstore/pstore.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ static int process_dmesg_files(PStoreList *list) {
227227
if (!startswith(pe->dirent.d_name, "dmesg-"))
228228
continue;
229229

230-
if ((p = startswith(pe->dirent.d_name, "dmesg-efi-"))) {
230+
/* The linux kernel changed the prefix from dmesg-efi- to dmesg-efi_pstore-
231+
* so now we have to handle both cases. */
232+
if ((p = STARTSWITH_SET(pe->dirent.d_name, "dmesg-efi-", "dmesg-efi_pstore-"))) {
231233
/* For the EFI backend, the 3 least significant digits of record id encodes a
232234
* "count" number, the next 2 least significant digits for the dmesg part
233235
* (chunk) number, and the remaining digits as the timestamp. See

0 commit comments

Comments
 (0)