]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/ArmVExpressFastBootDxe: eliminate deprecated string functions
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 25 Oct 2016 18:13:55 +0000 (19:13 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 28 Oct 2016 15:26:50 +0000 (16:26 +0100)
Get rid of functions that are no longer available when defining
DISABLE_NEW_DEPRECATED_INTERFACES

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBoot.c

index fe4ade5c9fa8c7a254a14873abea6287cf57352d..a01bf3c671ad4ba8a0a8cf9187beb8ccd803f984 100644 (file)
@@ -273,7 +273,7 @@ ArmFastbootPlatformInit (
 \r
       // Copy handle and partition name\r
       Entry->PartitionHandle = AllHandles[LoopIndex];\r
-      StrnCpy (\r
+      CopyMem (\r
         Entry->PartitionName,\r
         PartitionEntries[PartitionNode->PartitionNumber - 1].PartitionName, // Partition numbers start from 1.\r
         PARTITION_NAME_MAX_LENGTH\r
@@ -341,7 +341,8 @@ ArmFastbootPlatformFlashPartition (
   CHAR16                   PartitionNameUnicode[60];\r
   BOOLEAN                  PartitionFound;\r
 \r
-  AsciiStrToUnicodeStr (PartitionName, PartitionNameUnicode);\r
+  AsciiStrToUnicodeStrS (PartitionName, PartitionNameUnicode,\r
+    ARRAY_SIZE (PartitionNameUnicode));\r
 \r
   PartitionFound = FALSE;\r
   Entry = (FASTBOOT_PARTITION_LIST *) GetFirstNode (&(mPartitionListHead));\r
@@ -445,7 +446,7 @@ ArmFastbootPlatformGetVar (
   )\r
 {\r
   if (AsciiStrCmp (Name, "product")) {\r
-    AsciiStrCpy (Value, FixedPcdGetPtr (PcdFirmwareVendor));\r
+    AsciiStrCpyS (Value, 61, FixedPcdGetPtr (PcdFirmwareVendor));\r
   } else {\r
     *Value = '\0';\r
   }\r
@@ -479,7 +480,7 @@ ArmFastbootPlatformOemCommand (
 {\r
   CHAR16 CommandUnicode[65];\r
 \r
-  AsciiStrToUnicodeStr (Command, CommandUnicode);\r
+  AsciiStrToUnicodeStrS (Command, CommandUnicode, ARRAY_SIZE (CommandUnicode));\r
 \r
   if (AsciiStrCmp (Command, "Demonstrate") == 0) {\r
     DEBUG ((EFI_D_ERROR, "ARM OEM Fastboot command 'Demonstrate' received.\n"));\r