/** @file\r
Provides interface to shell internal functions for shell commands.\r
\r
- Copyright (c) 2013-2014, Hewlett-Packard Development Company, L.P.<BR>\r
+ (C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
//\r
Node = AllocateZeroPool(sizeof(SHELL_COMMAND_INTERNAL_LIST_ENTRY));\r
ASSERT(Node != NULL);\r
- Node->CommandString = AllocateZeroPool(StrSize(CommandString));\r
+ Node->CommandString = AllocateCopyPool(StrSize(CommandString), CommandString);\r
ASSERT(Node->CommandString != NULL);\r
\r
- //\r
- // populate the new struct\r
- //\r
- StrCpy(Node->CommandString, CommandString);\r
-\r
Node->GetManFileName = GetManFileName;\r
Node->CommandHandler = CommandHandler;\r
Node->LastError = CanAffectLE;\r
//\r
Node = AllocateZeroPool(sizeof(ALIAS_LIST));\r
ASSERT(Node != NULL);\r
- Node->CommandString = AllocateZeroPool(StrSize(Command));\r
- Node->Alias = AllocateZeroPool(StrSize(Alias));\r
+ Node->CommandString = AllocateCopyPool(StrSize(Command), Command);\r
+ Node->Alias = AllocateCopyPool(StrSize(Alias), Alias);\r
ASSERT(Node->CommandString != NULL);\r
ASSERT(Node->Alias != NULL);\r
\r
- //\r
- // populate the new struct\r
- //\r
- StrCpy(Node->CommandString, Command);\r
- StrCpy(Node->Alias , Alias );\r
-\r
InsertHeadList (&mAliasList.Link, &Node->Link);\r
\r
//\r
Status = EFI_OUT_OF_RESOURCES;\r
} else {\r
MapListNode->Flags = Flags;\r
- MapListNode->MapName = AllocateZeroPool(StrSize(Name));\r
+ MapListNode->MapName = AllocateCopyPool(StrSize(Name), Name);\r
MapListNode->DevicePath = DuplicateDevicePath(DevicePath);\r
if ((MapListNode->MapName == NULL) || (MapListNode->DevicePath == NULL)){\r
Status = EFI_OUT_OF_RESOURCES;\r
} else {\r
- StrCpy(MapListNode->MapName, Name);\r
InsertTailList(&gShellMapList.Link, &MapListNode->Link);\r
}\r
}\r