Page MenuHomeFreeBSD

LinuxKPI: add hex2bin()
ClosedPublic

Authored by bz on Jan 9 2022, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 5 2024, 1:46 AM
Unknown Object (File)
Sep 24 2024, 3:22 AM
Unknown Object (File)
Sep 19 2024, 2:04 AM
Unknown Object (File)
Sep 18 2024, 6:35 PM
Unknown Object (File)
Sep 17 2024, 7:33 PM
Unknown Object (File)
Sep 17 2024, 12:45 AM
Unknown Object (File)
Sep 16 2024, 3:52 AM
Unknown Object (File)
Sep 6 2024, 11:55 PM

Details

Summary

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

MFC after: 3 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43792
Build 40680: arc lint + arc unit

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.