Page MenuHomeFreeBSD

LinuxKPI: add hex2bin()
ClosedPublic

Authored by bz on Jan 9 2022, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 6:29 PM
Unknown Object (File)
Wed, Apr 17, 2:31 AM
Unknown Object (File)
Tue, Apr 2, 1:24 AM
Unknown Object (File)
Jan 12 2024, 7:42 AM
Unknown Object (File)
Dec 20 2023, 8:26 AM
Unknown Object (File)
Dec 11 2023, 9:24 AM
Unknown Object (File)
Nov 17 2023, 1:32 AM
Unknown Object (File)
Oct 19 2023, 5:12 PM

Details

Summary

Add a hex2bin() implementation needed by a driver's debugfs code.

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jan 9 2022, 1:10 AM

I couldn't find any in libkern to my surprise. Let me know if we do have something more native.

hselasky added inline comments.
sys/compat/linuxkpi/common/include/linux/kernel.h
652

Char is not always signed?? Use int8_t ?

sys/compat/linuxkpi/common/include/linux/kernel.h
652

Functions that return error codes should use "int" type.

How do you know EINVAL fits into char?

Use int instead of char as requested though I'd hope we never change EINVAL.

This revision is now accepted and ready to land.Jan 9 2022, 1:58 PM
This revision was automatically updated to reflect the committed changes.