Page MenuHomeFreeBSD

nvmecontrol: Create letoh generically convert to host order
ClosedPublic

Authored by imp on Apr 6 2024, 6:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 3:40 AM
Unknown Object (File)
Tue, Nov 5, 3:40 AM
Unknown Object (File)
Tue, Nov 5, 3:36 AM
Unknown Object (File)
Tue, Nov 5, 3:28 AM
Unknown Object (File)
Tue, Oct 29, 5:17 AM
Unknown Object (File)
Sep 30 2024, 5:45 PM
Unknown Object (File)
Sep 22 2024, 6:04 PM
Unknown Object (File)
Sep 22 2024, 5:17 PM
Subscribers

Details

Summary

Using _Generic, create LE2H which will generically convert uintXX_t
types from little endian to host, regardless of the size.

USE jhb's suggested name

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Apr 6 2024, 6:55 PM
This revision is now accepted and ready to land.Apr 8 2024, 1:56 PM

I kind of wonder if we'd like to just have this in <sys/endian.h> as letoh, but then you'd want the full complement of betoh, htobe, etc.

sbin/nvmecontrol/nvmecontrol.h
64
In D44649#1019208, @jhb wrote:

I kind of wonder if we'd like to just have this in <sys/endian.h> as letoh, but then you'd want the full complement of betoh, htobe, etc.

I'll convert to letoh, but leave the others for now because the be ones aren't needed and htole is harder as a macro and I'm not quite ready for it.

imp retitled this revision from nvmecontrol: Create LE2H to generically convert to host order to nvmecontrol: Create letoh generically convert to host order.Apr 16 2024, 10:46 PM
imp edited the summary of this revision. (Show Details)