Page MenuHomeFreeBSD

nvmecontrol: Create letoh generically convert to host order
ClosedPublic

Authored by imp on Sat, Apr 6, 6:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 4:47 AM
Unknown Object (File)
Wed, Apr 17, 8:24 AM
Unknown Object (File)
Fri, Apr 12, 1:45 PM
Unknown Object (File)
Wed, Apr 10, 2:18 AM
Unknown Object (File)
Sun, Apr 7, 8:18 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.Sat, Apr 6, 6:55 PM
This revision is now accepted and ready to land.Mon, Apr 8, 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.Tue, Apr 16, 10:46 PM
imp edited the summary of this revision. (Show Details)