/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. 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
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006 - 2007, Intel Corporation\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module Name:\r
\r
)\r
{\r
CHAR16 *Ptr;\r
- \r
+\r
Ptr = ConVarName;\r
- \r
+\r
//\r
// If the variable includes "Dev" at last, we consider\r
// it does not support NV attribute.\r
while (*Ptr) {\r
Ptr++;\r
}\r
- \r
+\r
if ((*(Ptr - 3) == 'D') && (*(Ptr - 2) == 'e') && (*(Ptr - 1) == 'v')) {\r
return FALSE;\r
} else {\r
\r
Routine Description:\r
\r
- This function update console variable based on ConVarName, it can \r
+ This function update console variable based on ConVarName, it can\r
add or remove one specific console device path from the variable\r
\r
Arguments:\r
Returns:\r
\r
EFI_UNSUPPORTED - Add or remove the same device path.\r
- \r
- EFI_SUCCESS - Success add or remove the device path from \r
+\r
+ EFI_SUCCESS - Success add or remove the device path from\r
the console variable.\r
\r
--*/\r
&gEfiGlobalVariableGuid,\r
&DevicePathSize\r
);\r
- \r
+\r
//\r
// Initialize NewDevicePath\r
//\r
NewDevicePath = VarConsole;\r
- \r
+\r
//\r
// If ExclusiveDevicePath is even the part of the instance in VarConsole, delete it.\r
// In the end, NewDevicePath is the final device path.\r
BdsLibSafeFreePool(TempNewDevicePath);\r
}\r
}\r
- \r
+\r
//\r
// The attribute for ConInDev, ConOutDev and ErrOutDev does not include NV.\r
//\r
//\r
Attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS;\r
}\r
- \r
+\r
//\r
// Finally, Update the variable of the default console by NewDevicePath\r
//\r
Returns:\r
\r
EFI_NOT_FOUND - There is not any console devices connected success\r
- \r
+\r
EFI_SUCCESS - Success connect any one instance of the console\r
device path base on the variable ConVarName.\r
\r
BdsLibSafeFreePool(Instance);\r
} while (CopyOfDevicePath != NULL);\r
\r
- gBS->FreePool (StartDevicePath);\r
+ FreePool (StartDevicePath);\r
\r
if (DeviceExist == FALSE) {\r
return EFI_NOT_FOUND;\r
\r
Routine Description:\r
\r
- This function will connect console device base on the console \r
+ This function will connect console device base on the console\r
device variable ConIn, ConOut and ErrOut.\r
\r
Arguments:\r
\r
EFI_SUCCESS - At least one of the ConIn and ConOut device have\r
been connected success.\r
- \r
+\r
EFI_STATUS - Return the status of BdsLibConnectConsoleVariable ().\r
\r
--*/\r
\r
//\r
// Because possibly the platform is legacy free, in such case,\r
- // ConIn devices (Serial Port and PS2 Keyboard ) does not exist, \r
+ // ConIn devices (Serial Port and PS2 Keyboard ) does not exist,\r
// so we need not check the status.\r
- // \r
+ //\r
BdsLibConnectConsoleVariable (L"ConIn");\r
\r
- // \r
+ //\r
// It seems impossible not to have any ConOut device on platform,\r
// so we check the status here.\r
//\r