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)
Sat, May 18, 1:31 PM
Unknown Object (File)
Sat, May 18, 1:31 PM
Unknown Object (File)
Sat, May 18, 1:31 PM
Unknown Object (File)
Fri, May 17, 5:32 AM
Unknown Object (File)
Sun, May 12, 9:38 AM
Unknown Object (File)
Apr 26 2024, 4:47 AM
Unknown Object (File)
Apr 17 2024, 8:24 AM
Unknown Object (File)
Apr 12 2024, 1:45 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)