]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/Main.c
ArmPlatformPkg: remove EblCmdLib implementation
[mirror_edk2.git] / EmbeddedPkg / Ebl / Main.c
index dc17d26c712e1ed888cc5d76c26825a3f201bf00..62f559fccfe8bbd8d2c775e13a19b943501d6a98 100644 (file)
@@ -3,6 +3,7 @@
 \r
   Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -87,7 +88,7 @@ SetCmdHistory (
     }\r
 \r
     // Copy the new command line into the ring buffer\r
-    AsciiStrnCpy(&mCmdHistory[mCmdHistoryStart][0], Cmd, MAX_CMD_LINE);\r
+    AsciiStrnCpyS (&mCmdHistory[mCmdHistoryStart][0], MAX_CMD_LINE, Cmd, MAX_CMD_LINE);\r
   }\r
 \r
   // Reset the command history for the next up arrow press\r
@@ -243,6 +244,7 @@ ParseArguments (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 EblGetCharKey (\r
   IN OUT EFI_INPUT_KEY            *Key,\r
   IN     UINTN                    TimeoutInSec,\r
@@ -315,6 +317,7 @@ EblGetCharKey (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 EblAnyKeyToContinueQtoQuit (\r
   IN  UINTN   *CurrentRow,\r
   IN  BOOLEAN PrefixNewline\r
@@ -429,7 +432,7 @@ GetCmd (
       }\r
       AsciiPrint (History);\r
       Index = AsciiStrLen (History);\r
-      AsciiStrnCpy (Cmd, History, CmdMaxSize);\r
+      AsciiStrnCpyS (Cmd, CmdMaxSize, History, CmdMaxSize);\r
     } else {\r
       Cmd[Index++] = Char;\r
       if (FixedPcdGetBool(PcdEmbeddedShellCharacterEcho) == TRUE) {\r
@@ -641,14 +644,14 @@ EdkBootLoaderEntry (
 \r
     Status = gRT->GetVariable(CommandLineVariableName, &VendorGuid, NULL, &CommandLineVariableSize, CommandLineVariable);\r
     if (!EFI_ERROR(Status)) {\r
-      UnicodeStrToAsciiStr(CommandLineVariable, CmdLine);\r
+      UnicodeStrToAsciiStrS (CommandLineVariable, CmdLine, MAX_CMD_LINE);\r
     }\r
 \r
     FreePool(CommandLineVariable);\r
   }\r
 \r
   if (EFI_ERROR(Status)) {\r
-    AsciiStrCpy (CmdLine, (CHAR8 *)PcdGetPtr (PcdEmbeddedAutomaticBootCommand));\r
+    AsciiStrCpyS (CmdLine, MAX_CMD_LINE, (CHAR8 *)PcdGetPtr (PcdEmbeddedAutomaticBootCommand));\r
   }\r
 \r
   for (;;) {\r