BaseTools/DevicePath: use explicit 64-bit number parsing routines

Replace invocations of StrHexToUintn() with StrHexToUint64(), so
that we can drop the former.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Ard Biesheuvel 2018-11-29 13:18:13 +01:00
parent 76e5f493d2
commit 6e2d15e3c4
1 changed files with 2 additions and 2 deletions

View File

@ -520,7 +520,7 @@ EisaIdFromText (
return (((Text[0] - 'A' + 1) & 0x1f) << 10) return (((Text[0] - 'A' + 1) & 0x1f) << 10)
+ (((Text[1] - 'A' + 1) & 0x1f) << 5) + (((Text[1] - 'A' + 1) & 0x1f) << 5)
+ (((Text[2] - 'A' + 1) & 0x1f) << 0) + (((Text[2] - 'A' + 1) & 0x1f) << 0)
+ (UINT32) (StrHexToUintn (&Text[3]) << 16) + (UINT32) (StrHexToUint64 (&Text[3]) << 16)
; ;
} }
@ -1506,7 +1506,7 @@ DevPathFromTextNVMe (
Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8); Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8);
while (Index-- != 0) { while (Index-- != 0) {
Uuid[Index] = (UINT8) StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-')); Uuid[Index] = (UINT8) StrHexToUint64 (SplitStr (&NamespaceUuidStr, L'-'));
} }
return (EFI_DEVICE_PATH_PROTOCOL *) Nvme; return (EFI_DEVICE_PATH_PROTOCOL *) Nvme;