Page MenuHomeFreeBSD

LinuxKPI: add hex2bin()
ClosedPublic

Authored by bz on Jan 9 2022, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 2, 2:28 AM
Unknown Object (File)
Wed, Jan 15, 11:42 PM
Unknown Object (File)
Dec 24 2024, 2:08 PM
Unknown Object (File)
Dec 5 2024, 6:51 PM
Unknown Object (File)
Nov 14 2024, 2:49 PM
Unknown Object (File)
Nov 12 2024, 8:00 PM
Unknown Object (File)
Nov 12 2024, 7:44 PM
Unknown Object (File)
Nov 9 2024, 2:06 AM

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.