diff options
author | Jose Luis Duran <jlduran@gmail.com> | 2022-02-24 01:55:30 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2022-02-27 16:12:47 +0000 |
commit | acfee0131adb8bbfb2a2fbe4d17d4e0fae2897d9 (patch) | |
tree | c7c36245a7b9d5b3e98e4422c42cc6a11a12137c /lib/libefivar/efivar-dp-parse.c | |
parent | 76ed5f1b2622892dff0468c2c94ba0c27b6d3dde (diff) | |
download | src-acfee0131adb8bbfb2a2fbe4d17d4e0fae2897d9.tar.gz src-acfee0131adb8bbfb2a2fbe4d17d4e0fae2897d9.zip |
Diffstat (limited to 'lib/libefivar/efivar-dp-parse.c')
-rw-r--r-- | lib/libefivar/efivar-dp-parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libefivar/efivar-dp-parse.c b/lib/libefivar/efivar-dp-parse.c index c527607c7184..5d5d0dfb7baa 100644 --- a/lib/libefivar/efivar-dp-parse.c +++ b/lib/libefivar/efivar-dp-parse.c @@ -2686,6 +2686,7 @@ DevPathFromTextiSCSI ( CHAR16 *ProtocolStr; CHAR8 *AsciiStr; ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; + UINT64 Lun; NameStr = GetNextParamStr (&TextDeviceNode); PortalGroupStr = GetNextParamStr (&TextDeviceNode); @@ -2704,7 +2705,8 @@ DevPathFromTextiSCSI ( StrToAscii (NameStr, &AsciiStr); ISCSIDevPath->TargetPortalGroupTag = (UINT16) Strtoi (PortalGroupStr); - Strtoi64 (LunStr, &ISCSIDevPath->Lun); + Strtoi64 (LunStr, &Lun); + WriteUnaligned64 ((UINT64 *) &ISCSIDevPath->Lun, SwapBytes64 (Lun)); Options = 0x0000; if (StrCmp (HeaderDigestStr, "CRC32C") == 0) { |