OSDN Git Service

NVDIMM: UUID<->GUID needs endian swizzling.
authorPeter Jones <pjones@redhat.com>
Tue, 16 Jan 2018 19:34:23 +0000 (14:34 -0500)
committerPeter Jones <pjones@redhat.com>
Fri, 9 Feb 2018 16:06:14 +0000 (11:06 -0500)
commit4d70eed40069e8ea1b16e65f4d641441445eab16
treec2242b7ecf726b890ff1b3c77aba02490c9a8529
parent1309b16cce2f2e5fbd145e9094e6f311dcf24a23
NVDIMM: UUID<->GUID needs endian swizzling.

The NVDIMM Label in sysfs is a UUID rather than a GUID.  The big
difference is UUIDs are stored opposite-endian from GUIDs, so
efi_str_to_guid() is giving us back a GUID with the first 8 bytes in the
wrong order.  Fix it up after we read it from sysfs and parse it.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/linux.c
src/util.h