Page MenuHomeFreeBSD

kboot: Assert errno is negative
ClosedPublic

Authored by imp on Feb 2 2023, 8:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 30, 1:01 PM
Unknown Object (File)
Mon, Apr 20, 9:34 AM
Unknown Object (File)
Tue, Apr 14, 11:30 AM
Unknown Object (File)
Mar 26 2026, 10:15 AM
Unknown Object (File)
Mar 25 2026, 5:09 PM
Unknown Object (File)
Mar 25 2026, 4:53 PM
Unknown Object (File)
Mar 23 2026, 4:22 PM
Unknown Object (File)
Mar 19 2026, 2:51 PM
Subscribers

Details

Summary

When converting from a Linux error to a FreeBSD errno, assert that the
value passed in is negative, as is Linux's custom.

Suggested by: brooks
Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Feb 2 2023, 8:27 PM

I'd be tempted to allow 0 so it could be used for standard syscall-like functions, but this is fine.

This revision is now accepted and ready to land.Feb 2 2023, 8:32 PM
This revision was automatically updated to reflect the committed changes.