FreeBSD: Improve dmesg kernel message prefix

Provide intuitive log search keywords and increased system consistency.

Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <robn@despairlabs.com>
Signed-off-by:	Alexander Ziaee <ziaee@FreeBSD.org>
Closes #18290
This commit is contained in:
Alexander Ziaee 2026-03-09 13:17:23 -04:00 committed by GitHub
parent 304de7f19b
commit d45c8d6489
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,21 +40,21 @@ vcmn_err(int ce, const char *fmt, va_list adx)
prefix = NULL; /* silence unwitty compilers */ prefix = NULL; /* silence unwitty compilers */
switch (ce) { switch (ce) {
case CE_CONT: case CE_CONT:
prefix = "Solaris(cont): "; prefix = "zfs(cont): ";
break; break;
case CE_NOTE: case CE_NOTE:
prefix = "Solaris: NOTICE: "; prefix = "zfs: NOTICE: ";
break; break;
case CE_WARN: case CE_WARN:
prefix = "Solaris: WARNING: "; prefix = "zfs: WARNING: ";
break; break;
case CE_PANIC: case CE_PANIC:
prefix = "Solaris(panic): "; prefix = "zfs(panic): ";
break; break;
case CE_IGNORE: case CE_IGNORE:
break; break;
default: default:
panic("Solaris: unknown severity level"); panic("zfs: unknown severity level");
} }
if (ce == CE_PANIC) { if (ce == CE_PANIC) {
vsnprintf(buf, sizeof (buf), fmt, adx); vsnprintf(buf, sizeof (buf), fmt, adx);