Page MenuHomeFreeBSD

kboot: Assert errno is negative
ClosedPublic

Authored by imp on Feb 2 2023, 8:27 PM.
Tags
None
Referenced Files
F107747135: D38357.diff
Fri, Jan 17, 10:47 PM
Unknown Object (File)
Nov 25 2024, 10:11 AM
Unknown Object (File)
Nov 5 2024, 12:53 AM
Unknown Object (File)
Nov 3 2024, 4:59 AM
Unknown Object (File)
Oct 19 2024, 1:18 PM
Unknown Object (File)
Oct 19 2024, 1:18 PM
Unknown Object (File)
Oct 19 2024, 1:18 PM
Unknown Object (File)
Oct 19 2024, 12:57 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 49490
Build 46380: arc lint + arc unit

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.