HomeFreeBSD

kboot: Create function for error checking.

Description

kboot: Create function for error checking.

Linux has the convention of returning -ERRNO to flag errors from its
system calls. Sometimes other negative values are returned that are
success... However, only values -1 to -4096 (inclusive) are really
errors. The rest are either truncated values that only look negative (so
use long instead of int), or are things like addresses or legal unsigned
file offsets or similar that are successful returns. Filter out the
latter.

Sponsored by: Netflix

Details

Provenance
impAuthored on Mar 11 2024, 8:15 PM
Parents
rGc112243f6bd3: Revert "Update to bring the rack stack with all its fixes in."
Branches
Unknown
Tags
Unknown