Skip to content

LOG_SYS_FATAL

Description

Writes a fatal log message and aborts the program, with the caller-supplied system error code explained.

First arg is the system error number (an errno-shaped value, or the -syscall_return value when the kernel ABI returns negated errno directly). The macro takes it as an argument so the expansion never has to reach into a platform-owned TLS error slot; dragging that symbol into every binary that uses LOG_SYS_* would defeat the no-platform-runtime stance. Use ErrnoOf(ret) from <Misra/Sys.h> to convert a syscall return value to an errno code in a platform-portable way.

Parameters

Name Direction Description
eno in System error code.

Success

Message + decoded error description appended; line written to fd 2; Abort() invoked. Never returns on the success path either.

Failure

Formatter / FileWrite errors are dropped; Abort() still executes.

Usage example (Cross-references)

Usage examples (Cross-references)
No external code usages found in the scanned files.
Last updated on