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)
Mon, Jun 29, 2:34 PM
Unknown Object (File)
Fri, Jun 26, 11:24 PM
Unknown Object (File)
Thu, Jun 25, 1:04 AM
Unknown Object (File)
Wed, Jun 24, 4:04 AM
Unknown Object (File)
Mon, Jun 22, 11:07 PM
Unknown Object (File)
Sun, Jun 21, 6:41 AM
Unknown Object (File)
Sat, Jun 20, 8:33 AM
Unknown Object (File)
Fri, Jun 19, 10:12 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.