HomeFreeBSD

LinuxKPI: add kstrtou32_from_user() and mac_pton()

Description

LinuxKPI: add kstrtou32_from_user() and mac_pton()

While here:

  • fix an argument of kstrtouint_from_user() to correct signedness.
  • make kstrtou32() call kstrtouint() to avoid duplication (keep inline function)

Add kstrtou32_from_user() based on other examples in the file
making it a copy of the now fixed kstrtouint_from_user().

Also add a rudimentarily hacked up version of mac_pton() which is
leanient accepting non-well-formed input but so far only with ':'
separators. It does not seem to obviously belong to any networking
header file so add it here.

Both new functions are needed for debugfs support for iwlwifi hence
coming together in one commit.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Commented on by: emaste
Differential Revision: https://reviews.freebsd.org/D37088

Details

Provenance
bzAuthored on Oct 22 2022, 6:02 PM
Differential Revision
D37088: LinuxKPI: add kstrtou32_from_user() and mac_pton()
Parents
rG6e011d15031a: makefs: don't needlessly require directories to exist
Branches
Unknown
Tags
Unknown