Page MenuHomeFreeBSD

linuxkpi: Correct kstrtobool
ClosedPublic

Authored by des on Jan 2 2026, 8:54 AM.
Tags
None
Referenced Files
F175193156: D54451.id168942.diff
Fri, Oct 9, 12:16 AM
F175192504: D54451.id168871.diff
Fri, Oct 9, 12:10 AM
F175191560: D54451.diff
Fri, Oct 9, 12:00 AM
Unknown Object (File)
Wed, Oct 7, 10:19 PM
Unknown Object (File)
Sat, Oct 3, 11:43 AM
Unknown Object (File)
Sat, Oct 3, 10:44 AM
Unknown Object (File)
Fri, Sep 25, 11:26 PM
Unknown Object (File)
Tue, Sep 15, 9:12 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 Not Applicable
Unit
Tests Not Applicable