Skip to content

Commit

Permalink
fix: prefix of dmesg pstore files
Browse files Browse the repository at this point in the history
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

(cherry picked from commit ef87c84)

Resolves: RHEL-20322
  • Loading branch information
gdamjan authored and github-actions[bot] committed Jun 11, 2024
1 parent 6cee9dd commit ee2dd3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pstore/pstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,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
Expand Down

0 comments on commit ee2dd3c

Please sign in to comment.