/** @file\r
Dynamically update the pages.\r
\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2015, 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
which accompanies this distribution. The full text of the license may be found at\r
UpdatePageEnd (CallbackData);\r
}\r
\r
-/**\r
-\r
- IsShellNodeDevicePath checks for the Shell device path. \r
- If it's the shell device path then return TRUE otherwise \r
- return FALSE.\r
-\r
- @param DevicePath The DevicePath to check\r
-\r
- @retval TRUE DevicePath is Shell\r
- @retval FALSE DevicePath is not Shell\r
-\r
-**/\r
-BOOLEAN\r
-IsShellNodeDevicePath(\r
- IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
- )\r
-{\r
-\r
- EFI_DEVICE_PATH_PROTOCOL *Node;\r
-\r
- for (Node = FilePath; !IsDevicePathEnd(Node); Node = NextDevicePathNode(Node)) \r
- {\r
- if ((DevicePathType (Node) == MEDIA_DEVICE_PATH) && (DevicePathSubType (Node) == MEDIA_PIWG_FW_FILE_DP)) {\r
- if (!CompareMem(PcdGetPtr(PcdShellFile), &(((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)Node)->FvFileName), sizeof(EFI_GUID)))\r
- return TRUE;\r
- }\r
- }\r
- return FALSE;\r
-}\r
\r
/**\r
Create a list of boot option from global BootOptionMenu. It\r
//\r
UnicodeValueToString (ModeString, 0, Col, 0);\r
PStr = &ModeString[0];\r
- StrnCat (PStr, L" x ", StrLen(L" x ") + 1);\r
+ StrnCatS (PStr, sizeof (ModeString) / sizeof (ModeString[0]), L" x ", StrLen(L" x ") + 1);\r
PStr = PStr + StrLen (PStr);\r
UnicodeValueToString (PStr , 0, Row, 0);\r
\r
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();\r
ASSERT (OptionsOpCodeHandle != NULL);\r
\r
- for (Index = 0; Index < 4; Index++) {\r
+ for (Index = 0; Index < sizeof (TerminalType) / sizeof (TerminalType[0]); Index++) {\r
CheckFlags = 0;\r
if (NewTerminalContext->TerminalType == Index) {\r
CheckFlags |= EFI_IFR_OPTION_DEFAULT;\r