Skip to content

Commit 023bbde

Browse files
vwaxkees
authored andcommitted
pstore: Add prefix to ECC messages
The "No errors detected" message from the ECC code is shown at the end of the pstore log and can be confusing or misleading, especially since it usually appears just after a kernel crash log which normally means quite the opposite of "no errors". Prefix the message to clarify that this message is only about ECC-detected errors. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220301144932.89549-1-vincent.whitchurch@axis.com
1 parent 26291c5 commit 023bbde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/pstore/ram_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz,
263263

264264
if (prz->corrected_bytes || prz->bad_blocks)
265265
ret = snprintf(str, len, ""
266-
"\n%d Corrected bytes, %d unrecoverable blocks\n",
266+
"\nECC: %d Corrected bytes, %d unrecoverable blocks\n",
267267
prz->corrected_bytes, prz->bad_blocks);
268268
else
269-
ret = snprintf(str, len, "\nNo errors detected\n");
269+
ret = snprintf(str, len, "\nECC: No errors detected\n");
270270

271271
return ret;
272272
}

0 commit comments

Comments
 (0)