Page MenuHomeFreeBSD

LinuxKPI: add hex2bin()
ClosedPublic

Authored by bz on Jan 9 2022, 1:10 AM.
Tags
None
Referenced Files
F132333326: D33798.id.diff
Wed, Oct 15, 11:58 PM
F132333325: D33798.id101167.diff
Wed, Oct 15, 11:58 PM
F132333319: D33798.id101149.diff
Wed, Oct 15, 11:58 PM
F132333316: D33798.id101165.diff
Wed, Oct 15, 11:58 PM
Unknown Object (File)
Wed, Oct 15, 1:28 PM
Unknown Object (File)
Mon, Oct 13, 3:15 AM
Unknown Object (File)
Mon, Oct 6, 6:00 AM
Unknown Object (File)
Thu, Sep 25, 10: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.