diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2026-02-26 06:20:12 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2026-02-26 06:20:12 +0000 |
| commit | 6fd98877de633f5ec6f028e78d5a2d94527d63d0 (patch) | |
| tree | cecc3c6fdb4ea25216538ed9794d094e4b0d63aa /stand/ficl32 | |
| parent | 56fbfd1ecdc78fc99b3a2e381c355ce8980de39d (diff) | |
When kernel external errors are available they are included in the
err(3) library function messages. In addition to the extended error
itself, the kernel also tracks the kernel file and line number at
which the error was generated. This additional information is not
included in the err(3) messages unless the EXTERROR_VERBOSE environment
variable is present. Currently, when EXTERROR_VERBOSE is present,
all the internal extended error information associated with the
error is printed most of which is redundant with the formatted error
message printed by err(3). This change will add only the kernel
file and line number to the err(3) message when EXTERROR_VERBOSE
is present and set to "brief".
Sample output with bad protection bits to mmap:
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8)
guest_16 % setenv EXTERROR_VERBOSE
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 errno 22 category 1 (src sys/vm/vm_mmap.c:200) p1 0x8 p2 0)
guest_16 % setenv EXTERROR_VERBOSE brief
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 (src sys/vm/vm_mmap.c:200))
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55494
MFC-after: 1 week
Sponsored-by: Netflix
Diffstat (limited to 'stand/ficl32')
0 files changed, 0 insertions, 0 deletions
