Page MenuHomeFreeBSD

linuxkpi: Correct kstrtobool
ClosedPublic

Authored by des on Jan 2 2026, 8:54 AM.
Tags
None
Referenced Files
F168267507: D54451.diff
Thu, Aug 27, 7:06 AM
Unknown Object (File)
Tue, Aug 25, 3:43 PM
Unknown Object (File)
Tue, Aug 25, 2:32 PM
Unknown Object (File)
Tue, Aug 25, 2:10 PM
Unknown Object (File)
Tue, Aug 25, 9:47 AM
Unknown Object (File)
Tue, Aug 25, 6:57 AM
Unknown Object (File)
Fri, Aug 21, 4:15 AM
Unknown Object (File)
Sat, Aug 15, 11:08 PM
Subscribers

Details

Summary

Implement the exact same logic as in Linux:

  • Accept 'e', 't', 'y', '1', "on" for true.
  • Accept 'd', 'f', 'n', '0', "of" for false.
  • Disregard any characters beyond that.
  • Check that the string is not null, but don't check the result pointer.

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69568
Build 66451: arc lint + arc unit