Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/ShellPkg
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 116 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ConsoleWrappers.c
r58459 r58466 116 116 117 117 /** 118 Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 118 Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 119 119 SHELL_FILE_HANDLE to support redirecting input from a file. 120 120 … … 156 156 ProtocolToReturn->SimpleTextIn.Reset = FileBasedSimpleTextInReset; 157 157 ProtocolToReturn->SimpleTextIn.ReadKeyStroke = FileBasedSimpleTextInReadKeyStroke; 158 158 159 159 Status = gBS->CreateEvent ( 160 160 EVT_NOTIFY_WAIT, … … 171 171 ///@todo possibly also install SimpleTextInputEx on the handle at this point. 172 172 Status = gBS->InstallProtocolInterface( 173 &(ProtocolToReturn->TheHandle), 174 &gEfiSimpleTextInProtocolGuid, 175 EFI_NATIVE_INTERFACE, 173 &(ProtocolToReturn->TheHandle), 174 &gEfiSimpleTextInProtocolGuid, 175 EFI_NATIVE_INTERFACE, 176 176 &(ProtocolToReturn->SimpleTextIn)); 177 177 if (!EFI_ERROR(Status)) { … … 185 185 186 186 /** 187 Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 187 Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 188 188 SHELL_FILE_HANDLE to support redirecting input from a file. 189 189 … … 208 208 209 209 Status1 = gBS->UninstallProtocolInterface( 210 ((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->TheHandle, 211 &gEfiSimpleTextInProtocolGuid, 210 ((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->TheHandle, 211 &gEfiSimpleTextInProtocolGuid, 212 212 &(((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->SimpleTextIn)); 213 213 … … 278 278 { 279 279 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *PassThruProtocol; 280 280 281 281 PassThruProtocol = ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *)This)->OriginalSimpleTextOut; 282 282 283 283 // Pass the QueryMode call thru to the original SimpleTextOutProtocol 284 284 return (PassThruProtocol->QueryMode( … … 416 416 417 417 /** 418 Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 418 Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 419 419 SHELL_FILE_HANDLE to support redirecting output from a file. 420 420 … … 469 469 470 470 Status = gBS->InstallProtocolInterface( 471 &(ProtocolToReturn->TheHandle), 472 &gEfiSimpleTextOutProtocolGuid, 473 EFI_NATIVE_INTERFACE, 471 &(ProtocolToReturn->TheHandle), 472 &gEfiSimpleTextOutProtocolGuid, 473 EFI_NATIVE_INTERFACE, 474 474 &(ProtocolToReturn->SimpleTextOut)); 475 475 if (!EFI_ERROR(Status)) { … … 483 483 484 484 /** 485 Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 485 Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 486 486 SHELL_FILE_HANDLE to support redirecting output from a file. 487 487 … … 501 501 } 502 502 Status = gBS->UninstallProtocolInterface( 503 ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->TheHandle, 504 &gEfiSimpleTextOutProtocolGuid, 503 ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->TheHandle, 504 &gEfiSimpleTextOutProtocolGuid, 505 505 &(((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->SimpleTextOut)); 506 506 FreePool(SimpleTextOut); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ConsoleWrappers.h
r58459 r58466 18 18 19 19 /** 20 Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 20 Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 21 21 SHELL_FILE_HANDLE to support redirecting input from a file. 22 22 … … 35 35 36 36 /** 37 Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 37 Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a 38 38 SHELL_FILE_HANDLE to support redirecting input from a file. 39 39 … … 49 49 50 50 /** 51 Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 51 Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 52 52 SHELL_FILE_HANDLE to support redirecting output from a file. 53 53 … … 68 68 69 69 /** 70 Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 70 Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a 71 71 SHELL_FILE_HANDLE to support redirecting output from a file. 72 72 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/FileHandleWrappers.c
r58459 r58466 19 19 20 20 /** 21 File style interface for console (Open). 22 21 File style interface for console (Open). 22 23 23 @param[in] This Ignored. 24 24 @param[out] NewHandle Ignored. … … 26 26 @param[in] OpenMode Ignored. 27 27 @param[in] Attributes Ignored. 28 28 29 29 @retval EFI_NOT_FOUND 30 30 **/ … … 44 44 /** 45 45 File style interface for console (Close, Delete, & Flush) 46 46 47 47 @param[in] This Ignored. 48 48 49 49 @retval EFI_SUCCESS 50 50 **/ … … 63 63 @param[in] This Ignored. 64 64 @param[out] Position Ignored. 65 65 66 66 @retval EFI_UNSUPPORTED 67 67 **/ … … 78 78 /** 79 79 File style interface for console (SetPosition). 80 80 81 81 @param[in] This Ignored. 82 82 @param[in] Position Ignored. 83 83 84 84 @retval EFI_UNSUPPORTED 85 85 **/ … … 96 96 /** 97 97 File style interface for console (GetInfo). 98 98 99 99 @param[in] This Ignored. 100 100 @param[in] InformationType Ignored. 101 101 @param[in, out] BufferSize Ignored. 102 102 @param[out] Buffer Ignored. 103 103 104 104 @retval EFI_UNSUPPORTED 105 105 **/ … … 118 118 /** 119 119 File style interface for console (SetInfo). 120 120 121 121 @param[in] This Ignored. 122 122 @param[in] InformationType Ignored. 123 123 @param[in] BufferSize Ignored. 124 124 @param[in] Buffer Ignored. 125 125 126 126 @retval EFI_UNSUPPORTED 127 127 **/ … … 142 142 143 143 Writes data to the screen. 144 144 145 145 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 146 146 @param[in, out] BufferSize Size in bytes of Buffer. 147 147 @param[in] Buffer The pointer to the buffer to write. 148 148 149 149 @retval EFI_UNSUPPORTED No output console is supported. 150 150 @return A return value from gST->ConOut->OutputString. … … 167 167 /** 168 168 File style interface for StdIn (Write). 169 169 170 170 @param[in] This Ignored. 171 171 @param[in, out] BufferSize Ignored. 172 172 @param[in] Buffer Ignored. 173 173 174 174 @retval EFI_UNSUPPORTED 175 175 **/ … … 189 189 190 190 Writes error to the error output. 191 191 192 192 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 193 193 @param[in, out] BufferSize Size in bytes of Buffer. 194 194 @param[in] Buffer The pointer to the buffer to write. 195 195 196 196 @return A return value from gST->StdErr->OutputString. 197 197 **/ … … 209 209 /** 210 210 File style interface for console StdOut (Read). 211 211 212 212 @param[in] This Ignored. 213 213 @param[in, out] BufferSize Ignored. 214 214 @param[out] Buffer Ignored. 215 215 216 216 @retval EFI_UNSUPPORTED 217 217 **/ … … 229 229 /** 230 230 File style interface for console StdErr (Read). 231 231 232 232 @param[in] This Ignored. 233 233 @param[in, out] BufferSize Ignored. 234 234 @param[out] Buffer Ignored. 235 235 236 236 @retval EFI_UNSUPPORTED Always. 237 237 **/ … … 249 249 /** 250 250 File style interface for NUL file (Read). 251 251 252 252 @param[in] This Ignored. 253 253 @param[in, out] BufferSize Poiner to 0 upon return. 254 254 @param[out] Buffer Ignored. 255 255 256 256 @retval EFI_SUCCESS Always. 257 257 **/ … … 270 270 /** 271 271 File style interface for NUL file (Write). 272 272 273 273 @param[in] This Ignored. 274 274 @param[in, out] BufferSize Ignored. 275 275 @param[in] Buffer Ignored. 276 276 277 277 @retval EFI_SUCCESS 278 278 **/ … … 940 940 941 941 Frees the memory for this object. 942 942 943 943 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 944 944 945 945 @retval EFI_SUCCESS 946 946 **/ … … 956 956 957 957 // 958 // Most if not all UEFI commands will have an '\r\n' at the end of any output. 959 // Since the output was redirected to a variable, it does not make sense to 958 // Most if not all UEFI commands will have an '\r\n' at the end of any output. 959 // Since the output was redirected to a variable, it does not make sense to 960 960 // keep this. So, before closing, strip the trailing '\r\n' from the variable 961 961 // if it exists. … … 969 969 if (NewBuffer == NULL) { 970 970 return EFI_OUT_OF_RESOURCES; 971 } 971 } 972 972 Status = SHELL_GET_ENVIRONMENT_VARIABLE(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, &NewSize, NewBuffer); 973 973 } 974 974 975 975 if (!EFI_ERROR(Status) && NewBuffer != NULL) { 976 976 977 977 if (StrSize(NewBuffer) > 6) 978 978 { 979 if ((((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 2] == CHAR_LINEFEED) 979 if ((((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 2] == CHAR_LINEFEED) 980 980 && (((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 3] == CHAR_CARRIAGE_RETURN)) { 981 ((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 3] = CHAR_NULL; 981 ((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 3] = CHAR_NULL; 982 982 } 983 983 984 984 if (IsVolatileEnv(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name)) { 985 985 Status = SHELL_SET_ENVIRONMENT_VARIABLE_V(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, StrSize(NewBuffer), NewBuffer); … … 988 988 } 989 989 } 990 } 991 990 } 991 992 992 SHELL_FREE_NON_NULL(NewBuffer); 993 993 FreePool((EFI_FILE_PROTOCOL_ENVIRONMENT*)This); … … 997 997 /** 998 998 File style interface for Environment Variable (Delete). 999 999 1000 1000 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1001 1001 1002 1002 @retval The return value from FileInterfaceEnvClose(). 1003 1003 **/ … … 1014 1014 /** 1015 1015 File style interface for Environment Variable (Read). 1016 1016 1017 1017 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1018 1018 @param[in, out] BufferSize Size in bytes of Buffer. 1019 1019 @param[out] Buffer The pointer to the buffer to fill. 1020 1020 1021 1021 @retval EFI_SUCCESS The data was read. 1022 1022 **/ … … 1037 1037 /** 1038 1038 File style interface for Volatile Environment Variable (Write). 1039 1039 1040 1040 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1041 1041 @param[in, out] BufferSize Size in bytes of Buffer. 1042 1042 @param[in] Buffer The pointer to the buffer to write. 1043 1043 1044 1044 @retval EFI_SUCCESS The data was read. 1045 1045 **/ … … 1084 1084 /** 1085 1085 File style interface for Non Volatile Environment Variable (Write). 1086 1086 1087 1087 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1088 1088 @param[in, out] BufferSize Size in bytes of Buffer. 1089 1089 @param[in] Buffer The pointer to the buffer to write. 1090 1090 1091 1091 @retval EFI_SUCCESS The data was read. 1092 1092 **/ … … 1169 1169 EnvFileInterface->Delete = FileInterfaceEnvDelete; 1170 1170 EnvFileInterface->Read = FileInterfaceEnvRead; 1171 1171 1172 1172 CopyMem(EnvFileInterface->Name, EnvName, EnvNameSize); 1173 1173 … … 1322 1322 /** 1323 1323 File style interface for Mem (SetPosition). 1324 1324 1325 1325 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1326 1326 @param[out] Position The position to set. 1327 1327 1328 1328 @retval EFI_SUCCESS The position was successfully changed. 1329 1329 @retval EFI_INVALID_PARAMETER The Position was invalid. … … 1346 1346 /** 1347 1347 File style interface for Mem (GetPosition). 1348 1348 1349 1349 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1350 1350 @param[out] Position The pointer to the position. 1351 1351 1352 1352 @retval EFI_SUCCESS The position was retrieved. 1353 **/ 1353 **/ 1354 1354 EFI_STATUS 1355 1355 EFIAPI … … 1365 1365 /** 1366 1366 File style interface for Mem (Write). 1367 1367 1368 1368 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1369 1369 @param[in, out] BufferSize Size in bytes of Buffer. 1370 1370 @param[in] Buffer The pointer to the buffer to write. 1371 1371 1372 1372 @retval EFI_OUT_OF_RESOURCES The operation failed due to lack of resources. 1373 1373 @retval EFI_SUCCESS The data was written. … … 1415 1415 /** 1416 1416 File style interface for Mem (Read). 1417 1417 1418 1418 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1419 1419 @param[in, out] BufferSize Size in bytes of Buffer. 1420 1420 @param[in] Buffer The pointer to the buffer to fill. 1421 1421 1422 1422 @retval EFI_SUCCESS The data was read. 1423 1423 **/ … … 1442 1442 1443 1443 Frees all memory associated with this object. 1444 1444 1445 1445 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1446 1446 1447 1447 @retval EFI_SUCCESS The 'file' was closed. 1448 **/ 1448 **/ 1449 1449 EFI_STATUS 1450 1450 EFIAPI … … 1527 1527 @param This Protocol instance pointer. 1528 1528 @param Position Byte position from the start of the file. 1529 1529 1530 1530 @retval EFI_SUCCESS Data was written. 1531 1531 @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open. … … 1547 1547 @param This Protocol instance pointer. 1548 1548 @param Position Byte position from the start of the file. 1549 1549 1550 1550 @retval EFI_SUCCESS Data was written. 1551 1551 @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.. … … 1723 1723 1724 1724 @param This Protocol instance pointer. 1725 1725 1726 1726 @retval EFI_SUCCESS The device was opened. 1727 1727 @retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted. … … 1742 1742 /** 1743 1743 File style interface for File (Close). 1744 1744 1745 1745 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1746 1746 1747 1747 @retval EFI_SUCCESS The file was closed. 1748 1748 **/ … … 1762 1762 File style interface for File (Write). 1763 1763 1764 If the file was opened with ASCII mode the data will be processed through 1764 If the file was opened with ASCII mode the data will be processed through 1765 1765 AsciiSPrint before writing. 1766 1766 1767 1767 @param[in] This The pointer to the EFI_FILE_PROTOCOL object. 1768 1768 @param[in, out] BufferSize Size in bytes of Buffer. 1769 1769 @param[in] Buffer The pointer to the buffer to write. 1770 1770 1771 1771 @retval EFI_SUCCESS The data was written. 1772 1772 **/ … … 1805 1805 This will create a new EFI_FILE_PROTOCOL identical to the Templace 1806 1806 except that the new one has Unicode and Ascii knowledge. 1807 1807 1808 1808 @param[in] Template A pointer to the EFI_FILE_PROTOCOL object. 1809 1809 @param[in] Unicode TRUE for UCS-2, FALSE for ASCII. 1810 1810 1811 1811 @return a new EFI_FILE_PROTOCOL object to be used instead of the template. 1812 1812 **/ -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/Shell.c
r58459 r58466 102 102 103 103 /** 104 Parse for the next instance of one string within another string. Can optionally make sure that 104 Parse for the next instance of one string within another string. Can optionally make sure that 105 105 the string was not escaped (^ character) per the shell specification. 106 106 … … 159 159 { 160 160 CONST CHAR16 *Walker; 161 161 162 162 Walker = NULL; 163 163 … … 165 165 ASSERT (EndPercent != NULL); 166 166 ASSERT (BeginPercent < EndPercent); 167 167 168 168 if ((BeginPercent + 1) == EndPercent) { 169 169 return FALSE; … … 212 212 TempSpot = FindFirstCharacter(CmdLine, L"|", L'^'); 213 213 214 if (FirstQuote == NULL || 215 TempSpot == NULL || 216 TempSpot == CHAR_NULL || 214 if (FirstQuote == NULL || 215 TempSpot == NULL || 216 TempSpot == CHAR_NULL || 217 217 FirstQuote > TempSpot 218 218 ) { … … 223 223 if (FirstQuote == NULL || FirstQuote > TempSpot) { 224 224 break; 225 } 225 } 226 226 SecondQuote = FindNextInstance (FirstQuote + 1, L"\"", TRUE); 227 227 if (SecondQuote == NULL) { … … 235 235 TempSpot = FindFirstCharacter(TempSpot + 1, L"|", L'^'); 236 236 continue; 237 } 238 } 239 237 } 238 } 239 240 240 return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL)); 241 241 } 242 242 243 243 /** 244 Function to start monitoring for CTRL-S using SimpleTextInputEx. This 244 Function to start monitoring for CTRL-S using SimpleTextInputEx. This 245 245 feature's enabled state was not known when the shell initially launched. 246 246 … … 267 267 if (EFI_ERROR(Status)) { 268 268 ShellPrintHiiEx( 269 -1, 270 -1, 269 -1, 270 -1, 271 271 NULL, 272 272 STRING_TOKEN (STR_SHELL_NO_IN_EX), … … 285 285 NotificationFunction, 286 286 &ShellInfoObject.CtrlSNotifyHandle1); 287 287 288 288 KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED; 289 289 if (!EFI_ERROR(Status)) { … … 303 303 NotificationFunction, 304 304 &ShellInfoObject.CtrlSNotifyHandle3); 305 } 305 } 306 306 KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED; 307 307 if (!EFI_ERROR(Status)) { … … 1374 1374 continue; 1375 1375 } 1376 1376 1377 1377 if (FirstQuote == NULL || SecondPercent < FirstQuote) { 1378 1378 if (IsValidEnvironmentVariableName(FirstPercent, SecondPercent)) { … … 1515 1515 ShellCopySearchAndReplace(NewCommandLine1, NewCommandLine2, NewSize, L"^%", L"%", TRUE, FALSE); 1516 1516 StrnCpy(NewCommandLine1, NewCommandLine2, NewSize/sizeof(CHAR16)-1); 1517 1517 1518 1518 FreePool(NewCommandLine2); 1519 1519 FreePool(ItemTemp); … … 1633 1633 1634 1634 /** 1635 Take the original command line, substitute any variables, free 1635 Take the original command line, substitute any variables, free 1636 1636 the original string, return the modified copy. 1637 1637 … … 1658 1658 1659 1659 /** 1660 Take the original command line, substitute any alias in the first group of space delimited characters, free 1660 Take the original command line, substitute any alias in the first group of space delimited characters, free 1661 1661 the original string, return the modified copy. 1662 1662 … … 1718 1718 SHELL_FREE_NON_NULL(*CmdLine); 1719 1719 SHELL_FREE_NON_NULL(CommandName); 1720 1720 1721 1721 // 1722 1722 // re-assign the passed in double pointer to point to our newly allocated buffer … … 1731 1731 1732 1732 @param[in] CmdName pointer to the command line to update. 1733 1733 1734 1734 @retval Internal_Command The name is an internal command. 1735 1735 @retval File_Sys_Change the name is a file system change. … … 1760 1760 // 1761 1761 if (CmdName[(StrLen(CmdName)-1)] == L':') { 1762 if ( StrStr(CmdName, L" ") != NULL 1762 if ( StrStr(CmdName, L" ") != NULL 1763 1763 || StrLen(StrStr(CmdName, L":")) > 1 1764 1764 ) { … … 1790 1790 return (Efi_Application); 1791 1791 } 1792 1792 1793 1793 SHELL_FREE_NON_NULL(FileWithPath); 1794 1794 // … … 1807 1807 @retval EFI_NOT_FOUND The operation type is unknown or invalid. 1808 1808 **/ 1809 EFI_STATUS 1809 EFI_STATUS 1810 1810 EFIAPI 1811 1811 IsValidSplit( … … 1959 1959 // 1960 1960 ASSERT(CmdLine[(StrLen(CmdLine)-1)] == L':' && StrStr(CmdLine, L" ") == NULL); 1961 1961 1962 1962 // 1963 1963 // Call the protocol API to do the work … … 2107 2107 2108 2108 This API will upadate the shell's environment since these commands are libraries. 2109 2109 2110 2110 @param[in] CmdLine the command line to run. 2111 2111 @param[in] FirstParameter the first parameter on the command line … … 2129 2129 BOOLEAN LastError; 2130 2130 CHAR16 *Walker; 2131 CHAR16 *NewCmdLine; 2131 CHAR16 *NewCmdLine; 2132 2132 2133 2133 NewCmdLine = AllocateCopyPool (StrSize (CmdLine), CmdLine); … … 2389 2389 Function will process and run a command line. 2390 2390 2391 This will determine if the command line represents an internal shell 2391 This will determine if the command line represents an internal shell 2392 2392 command or dispatch an external application. 2393 2393 … … 2463 2463 SHELL_FREE_NON_NULL(CleanOriginal); 2464 2464 return (Status); 2465 } 2465 } 2466 2466 2467 2467 // … … 2499 2499 SetLastError(SHELL_NOT_FOUND); 2500 2500 } 2501 2501 2502 2502 SHELL_FREE_NON_NULL(CleanOriginal); 2503 2503 SHELL_FREE_NON_NULL(FirstParameter); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/Shell.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellEnvVar.c
r58459 r58466 139 139 return (EFI_INVALID_PARAMETER); 140 140 } 141 141 142 142 Status = EFI_SUCCESS; 143 143 144 144 ValBufferSize = INIT_DATA_BUFFER_SIZE; 145 145 NameBufferSize = INIT_NAME_BUFFER_SIZE; … … 167 167 Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid); 168 168 } 169 169 170 170 if (!EFI_ERROR(Status) && CompareGuid(&Guid, &gShellVariableGuid)){ 171 171 VarList = AllocateZeroPool(sizeof(ENV_VAR_LIST)); … … 190 190 break; 191 191 } 192 192 193 193 ValSize = ValBufferSize; 194 194 Status = SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(VariableName, &VarList->Atts, &ValSize, VarList->Val); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellParametersProtocol.c
r58459 r58466 144 144 // Remove any remaining escape characters in the string 145 145 // 146 for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL) 147 ; *NextDelim != CHAR_NULL 146 for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL) 147 ; *NextDelim != CHAR_NULL 148 148 ; NextDelim = FindFirstCharacter(NextDelim, L"\"^", CHAR_NULL) 149 149 ) { … … 174 174 delimited and quote surrounded parameter definition. 175 175 176 All special character processing (alias, environment variable, redirection, 176 All special character processing (alias, environment variable, redirection, 177 177 etc... must be complete before calling this API. 178 178 … … 483 483 gEfiShellProtocol->SetFilePosition(Handle, OriginalFilePosition); 484 484 gEfiShellProtocol->CloseFile(Handle); 485 return (Status); 485 return (Status); 486 486 } 487 487 … … 562 562 if ((TempLocation = StrStr(Copy , L"\"")) != NULL) { 563 563 TempLocation[0] = CHAR_NULL; 564 } 564 } 565 565 } else { 566 566 Copy = FileName; … … 570 570 if ((TempLocation = StrStr(Copy , L" ")) != NULL) { 571 571 TempLocation[0] = CHAR_NULL; 572 } 572 } 573 573 } 574 574 … … 603 603 if ((TempLocation = StrStr(Copy , L"%")) != NULL) { 604 604 TempLocation[0] = CHAR_NULL; 605 } 605 } 606 606 } 607 607 … … 612 612 Remove the unicode file tag from the begining of the file buffer since that will not be 613 613 used by StdIn. 614 614 615 615 @param[in] Handle Pointer to the handle of the file to be processed. 616 616 617 617 @retval EFI_SUCCESS The unicode file tag has been moved successfully. 618 618 **/ … … 820 820 Status = EFI_NOT_FOUND; 821 821 } 822 } 822 } 823 823 if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >> ")) != NULL) { 824 824 FirstLocation = MIN(CommandLineWalker, FirstLocation); … … 847 847 Status = EFI_NOT_FOUND; 848 848 } 849 } 849 } 850 850 if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" 1>a ")) != NULL) { 851 851 FirstLocation = MIN(CommandLineWalker, FirstLocation); … … 861 861 Status = EFI_NOT_FOUND; 862 862 } 863 } 863 } 864 864 if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >a ")) != NULL) { 865 865 FirstLocation = MIN(CommandLineWalker, FirstLocation); … … 1089 1089 // Cant redirect during a reconnect operation. 1090 1090 // 1091 ||(StrStr(NewCommandLine, L"connect -r") != NULL 1091 ||(StrStr(NewCommandLine, L"connect -r") != NULL 1092 1092 && (StdOutVarName != NULL || StdOutFileName != NULL || StdErrFileName != NULL || StdErrVarName != NULL)) 1093 1093 // … … 1295 1295 SPLIT_LIST *Split; 1296 1296 1297 if (ShellParameters == NULL 1297 if (ShellParameters == NULL 1298 1298 ||OldStdIn == NULL 1299 1299 ||OldStdOut == NULL -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellProtocol.c
r58459 r58466 1172 1172 **/ 1173 1173 EFI_STATUS 1174 EFIAPI 1174 EFIAPI 1175 1175 EfiShellRegisterGuidName( 1176 1176 IN CONST EFI_GUID *Guid, … … 1402 1402 environment variable name and y is the value. If this 1403 1403 is NULL, then the current shell environment is used. 1404 1404 1405 1405 @param[out] StartImageStatus Returned status from gBS->StartImage. 1406 1406 … … 1440 1440 1441 1441 NewHandle = NULL; 1442 1442 1443 1443 NewCmdLine = AllocateCopyPool (StrSize (CommandLine), CommandLine); 1444 1444 if (NewCmdLine == NULL) { … … 2047 2047 **/ 2048 2048 EFI_STATUS 2049 EFIAPI 2049 EFIAPI 2050 2050 EfiShellGetGuidFromName( 2051 2051 IN CONST CHAR16 *GuidName, … … 2059 2059 return (EFI_INVALID_PARAMETER); 2060 2060 } 2061 2061 2062 2062 Status = GetGuidFromStringName(GuidName, NULL, &NewGuid); 2063 2063 … … 2087 2087 **/ 2088 2088 EFI_STATUS 2089 EFIAPI 2089 EFIAPI 2090 2090 EfiShellGetGuidName( 2091 2091 IN CONST EFI_GUID *Guid, … … 2563 2563 **/ 2564 2564 CONST CHAR16 * 2565 EFIAPI 2565 EFIAPI 2566 2566 EfiShellGetEnvEx( 2567 2567 IN CONST CHAR16 *Name, … … 3105 3105 ) 3106 3106 { 3107 3107 3108 3108 EFI_STATUS Status; 3109 3109 EFI_GUID Guid; … … 3140 3140 break; 3141 3141 } 3142 3142 3143 3143 NameSize = NameBufferSize; 3144 3144 Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid); 3145 3145 } 3146 3146 3147 3147 if (EFI_ERROR (Status)) { 3148 3148 SHELL_FREE_NON_NULL(RetVal); … … 3150 3150 break; 3151 3151 } 3152 3152 3153 3153 if (CompareGuid(&Guid, &gShellAliasGuid)){ 3154 3154 ASSERT((RetVal == NULL && RetSize == 0) || (RetVal != NULL)); … … 3165 3165 Convert a null-terminated unicode string, in-place, to all lowercase. 3166 3166 Then return it. 3167 3167 3168 3168 @param Str The null-terminated string to be converted to all lowercase. 3169 3170 @return The null-terminated string converted into all lowercase. 3169 3170 @return The null-terminated string converted into all lowercase. 3171 3171 **/ 3172 3172 CHAR16 * … … 3628 3628 (KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))) || 3629 3629 (KeyData->Key.UnicodeChar == 3) 3630 ){ 3630 ){ 3631 3631 if (ShellInfoObject.NewEfiShellProtocol->ExecutionBreak == NULL) { 3632 3632 return (EFI_UNSUPPORTED); … … 3635 3635 } else if ((KeyData->Key.UnicodeChar == L's') && 3636 3636 (KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED)) 3637 ){ 3637 ){ 3638 3638 ShellInfoObject.HaltOutput = TRUE; 3639 3639 } … … 3642 3642 3643 3643 /** 3644 Function to start monitoring for CTRL-C using SimpleTextInputEx. This 3644 Function to start monitoring for CTRL-C using SimpleTextInputEx. This 3645 3645 feature's enabled state was not known when the shell initially launched. 3646 3646 … … 3667 3667 if (EFI_ERROR(Status)) { 3668 3668 ShellPrintHiiEx( 3669 -1, 3670 -1, 3669 -1, 3670 -1, 3671 3671 NULL, 3672 3672 STRING_TOKEN (STR_SHELL_NO_IN_EX), … … 3689 3689 NotificationFunction, 3690 3690 &ShellInfoObject.CtrlCNotifyHandle1); 3691 3691 3692 3692 KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED; 3693 3693 if (!EFI_ERROR(Status)) { -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellProtocol.h
r58459 r58466 37 37 This must be removed via calling CleanUpShellProtocol(). 38 38 39 @param[in, out] NewShell The pointer to the pointer to the structure 39 @param[in, out] NewShell The pointer to the pointer to the structure 40 40 to install. 41 41 … … 50 50 51 51 /** 52 Opposite of CreatePopulateInstallShellProtocol. 52 Opposite of CreatePopulateInstallShellProtocol. 53 53 54 54 Free all memory and restore the system to the state it was in before calling … … 915 915 916 916 /** 917 Function to start monitoring for CTRL-C using SimpleTextInputEx. This 917 Function to start monitoring for CTRL-C using SimpleTextInputEx. This 918 918 feature's enabled state was not known when the shell initially launched. 919 919 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Include/Library/HandleParsingLib.h
r58459 r58466 121 121 /** 122 122 Get best support language for this driver. 123 124 First base on the user input language to search, second base on the current 125 platform used language to search, third get the first language from the 123 124 First base on the user input language to search, second base on the current 125 platform used language to search, third get the first language from the 126 126 support language list. The caller need to free the buffer of the best language. 127 127 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Include/Library/PathLib.h
r48674 r58466 34 34 35 35 /** 36 Function to clean up paths. 37 36 Function to clean up paths. 37 38 38 - Single periods in the path are removed. 39 39 - Double periods in the path are removed along with a single parent directory. 40 40 - Forward slashes L'/' are converted to backward slashes L'\'. 41 41 42 This will be done inline and the existing buffer may be larger than required 42 This will be done inline and the existing buffer may be larger than required 43 43 upon completion. 44 44 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Include/Library/ShellCommandLib.h
r58459 r58466 508 508 509 509 /** 510 Create a consistent mapped name for the device specified by DevicePath 510 Create a consistent mapped name for the device specified by DevicePath 511 511 based on the Table. 512 512 513 This must be called after ShellCommandConsistMappingInitialize() and 513 This must be called after ShellCommandConsistMappingInitialize() and 514 514 before ShellCommandConsistMappingUnInitialize() is called. 515 515 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Include/Library/ShellLib.h
r58459 r58466 1348 1348 /** 1349 1349 Function to delete a file by name 1350 1350 1351 1351 @param[in] FileName Pointer to file name to delete. 1352 1352 1353 1353 @retval EFI_SUCCESS the file was deleted sucessfully 1354 1354 @retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not … … 1380 1380 @param[in] CommandToGetHelpOn Pointer to a string containing the command name of help file to be printed. 1381 1381 @param[in] SectionToGetHelpOn Pointer to the section specifier(s). 1382 @param[in] PrintCommandText If TRUE, prints the command followed by the help content, otherwise prints 1382 @param[in] PrintCommandText If TRUE, prints the command followed by the help content, otherwise prints 1383 1383 the help content only. 1384 1384 @retval EFI_DEVICE_ERROR The help data format was incorrect. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Include/Protocol/EfiShell.h
r58459 r58466 416 416 417 417 /** 418 Gets the environment variable and Attributes, or list of environment variables. Can be 418 Gets the environment variable and Attributes, or list of environment variables. Can be 419 419 used instead of GetEnv(). 420 420 … … 424 424 425 425 @param[in] Name A pointer to the environment variable name. If Name is NULL, 426 then the function will return all of the defined shell 426 then the function will return all of the defined shell 427 427 environment variables. In the case where multiple environment 428 variables are being returned, each variable will be terminated 428 variables are being returned, each variable will be terminated 429 429 by a NULL, and the list will be terminated by a double NULL. 430 430 @param[out] Attributes If not NULL, a pointer to the returned attributes bitmask for … … 433 433 is undefined. 434 434 435 @retval NULL The environment variable doesn't exist. 436 @return The environment variable's value. The returned pointer does not 437 need to be freed by the caller. 435 @retval NULL The environment variable doesn't exist. 436 @return The environment variable's value. The returned pointer does not 437 need to be freed by the caller. 438 438 **/ 439 439 typedef -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Include/Protocol/EfiShellDynamicCommand.h
r58464 r58466 75 75 /// EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL protocol structure. 76 76 struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL { 77 77 78 78 CONST CHAR16 *CommandName; 79 79 SHELL_COMMAND_HANDLER Handler; -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/BasePathLib/BasePathLib.c
r58459 r58466 16 16 #include <Library/PathLib.h> 17 17 #include <Library/BaseLib.h> 18 #include <Protocol/SimpleTextIn.h> 18 #include <Protocol/SimpleTextIn.h> 19 19 20 20 /** … … 54 54 55 55 /** 56 Function to clean up paths. 57 56 Function to clean up paths. 57 58 58 - Single periods in the path are removed. 59 59 - Double periods in the path are removed along with a single parent directory. 60 60 - Forward slashes L'/' are converted to backward slashes L'\'. 61 61 62 This will be done inline and the existing buffer may be larger than required 62 This will be done inline and the existing buffer may be larger than required 63 63 upon completion. 64 64 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/BasePathLib/BasePathLib.inf
r48674 r58466 32 32 MdePkg/MdePkg.dec 33 33 ShellPkg/ShellPkg.dec 34 34 35 35 36 36 [LibraryClasses] -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiDpLib/Dp.c
r58464 r58466 13 13 Dp uses this information to group records in different ways. It also uses 14 14 timer information to calculate elapsed time for each measurement. 15 15 16 16 Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved. 17 17 This program and the accompanying materials … … 19 19 which accompanies this distribution. The full text of the license may be found at 20 20 http://opensource.org/licenses/bsd-license.php 21 21 22 22 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 23 23 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. … … 111 111 } 112 112 113 /** 113 /** 114 114 Dump performance data. 115 115 116 116 @param[in] ImageHandle The image handle. 117 117 @param[in] SystemTable The system table. 118 118 119 119 @retval EFI_SUCCESS Command completed successfully. 120 120 @retval EFI_INVALID_PARAMETER Command usage error. 121 121 @retval value Unknown error. 122 122 123 123 **/ 124 124 SHELL_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiDpLib/DpInternal.h
r58464 r58466 43 43 ///@} 44 44 45 /** 45 /** 46 46 Calculate an event's duration in timer ticks. 47 47 48 48 Given the count direction and the event's start and end timer values, 49 49 calculate the duration of the event in timer ticks. Information for 50 50 the current measurement is pointed to by the parameter. 51 51 52 52 If the measurement's start time is 1, it indicates that the developer 53 53 is indicating that the measurement began at the release of reset. 54 54 The start time is adjusted to the timer's starting count before performing 55 55 the elapsed time calculation. 56 56 57 57 The calculated duration, in ticks, is the absolute difference between 58 58 the measurement's ending and starting counts. 59 59 60 60 @param Measurement Pointer to a MEASUREMENT_RECORD structure containing 61 61 data for the current measurement. 62 62 63 63 @return The 64-bit duration of the event. 64 64 **/ … … 68 68 ); 69 69 70 /** 70 /** 71 71 Determine whether the Measurement record is for an EFI Phase. 72 72 73 73 The Token and Module members of the measurement record are checked. 74 74 Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL. 75 75 76 76 @param[in] Measurement A pointer to the Measurement record to test. 77 77 78 78 @retval TRUE The measurement record is for an EFI Phase. 79 79 @retval FALSE The measurement record is NOT for an EFI Phase. … … 84 84 ); 85 85 86 /** 86 /** 87 87 Get the file name portion of the Pdb File Name. 88 88 89 89 The portion of the Pdb File Name between the last backslash and 90 90 either a following period or the end of the string is converted 91 91 to Unicode and copied into UnicodeBuffer. The name is truncated, 92 92 if necessary, to ensure that UnicodeBuffer is not overrun. 93 93 94 94 @param[in] PdbFileName Pdb file name. 95 95 @param[out] UnicodeBuffer The resultant Unicode File Name. 96 96 97 97 **/ 98 98 VOID … … 102 102 ); 103 103 104 /** 104 /** 105 105 Get a human readable name for an image handle. 106 106 The following methods will be tried orderly: … … 111 111 5. Image DevicePath 112 112 6. Unknown Driver Name 113 113 114 114 @param[in] Handle 115 115 116 116 @post The resulting Unicode name string is stored in the 117 117 mGaugeString global array. 118 118 119 119 **/ 120 120 VOID … … 123 123 ); 124 124 125 /** 125 /** 126 126 Calculate the Duration in microseconds. 127 127 128 128 Duration is multiplied by 1000, instead of Frequency being divided by 1000 or 129 129 multiplying the result by 1000, in order to maintain precision. Since Duration is 130 130 a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow. 131 131 132 132 The time is calculated as (Duration * 1000) / Timer_Frequency. 133 133 134 134 @param[in] Duration The event duration in timer ticks. 135 135 136 136 @return A 64-bit value which is the Elapsed time in microseconds. 137 137 **/ … … 141 141 ); 142 142 143 /** 143 /** 144 144 Get index of Measurement Record's match in the CumData array. 145 145 146 146 If the Measurement's Token value matches a Token in one of the CumData 147 147 records, the index of the matching record is returned. The returned 148 148 index is a signed value so that negative values can indicate that 149 149 the Measurement didn't match any entry in the CumData array. 150 150 151 151 @param[in] Measurement A pointer to a Measurement Record to match against the CumData array. 152 152 153 153 @retval <0 Token is not in the CumData array. 154 154 @retval >=0 Return value is the index into CumData where Token is found. … … 159 159 ); 160 160 161 /** 161 /** 162 162 Collect verbose statistics about the logged performance measurements. 163 163 164 164 General Summary information for all Trace measurements is gathered and 165 165 stored within the SummaryData structure. This information is both 166 166 used internally by subsequent reporting functions, and displayed 167 167 at the end of verbose reports. 168 168 169 169 @pre The SummaryData and CumData structures must be initialized 170 170 prior to calling this function. 171 171 172 172 @post The SummaryData and CumData structures contain statistics for the 173 173 current performance logs. … … 178 178 ); 179 179 180 /** 180 /** 181 181 Gather and print ALL Trace Records. 182 182 183 183 Displays all "interesting" Trace measurements in order.<BR> 184 184 The number of records displayed is controlled by: … … 187 187 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 188 188 displayed. 189 189 190 190 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 191 191 The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. 192 192 They must not be in use by a calling function. 193 193 194 194 @param[in] Limit The number of records to print. Zero is ALL. 195 195 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 196 196 197 197 **/ 198 198 VOID … … 202 202 ); 203 203 204 /** 204 /** 205 205 Gather and print Raw Trace Records. 206 206 207 207 All Trace measurements with a duration greater than or equal to 208 208 mInterestThreshold are printed without interpretation. 209 209 210 210 The number of records displayed is controlled by: 211 211 - records with a duration less than mInterestThreshold microseconds are not displayed. … … 213 213 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 214 214 displayed. 215 215 216 216 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 217 217 218 218 @param[in] Limit The number of records to print. Zero is ALL. 219 219 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 220 220 221 221 **/ 222 222 VOID … … 226 226 ); 227 227 228 /** 228 /** 229 229 Gather and print Major Phase metrics. 230 230 231 231 @param[in] Ticker The timer value for the END of Shell phase 232 232 233 233 **/ 234 234 VOID … … 238 238 239 239 240 /** 240 /** 241 241 Gather and print Handle data. 242 242 243 243 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 244 244 245 245 @return Status from a call to gBS->LocateHandle(). 246 246 **/ … … 251 251 252 252 253 /** 253 /** 254 254 Gather and print PEIM data. 255 255 256 256 Only prints complete PEIM records 257 257 258 258 **/ 259 259 VOID … … 262 262 ); 263 263 264 /** 264 /** 265 265 Gather and print global data. 266 266 267 267 Strips out incomplete or "Execution Phase" records 268 268 Only prints records where Handle is NULL 269 269 Increment TIndex for every record, even skipped ones, so that we have an 270 270 indication of every measurement record taken. 271 271 272 272 **/ 273 273 VOID … … 276 276 ); 277 277 278 /** 278 /** 279 279 Gather and print cumulative data. 280 280 281 281 Traverse the measurement records and:<BR> 282 282 For each record with a Token listed in the CumData array:<BR> 283 283 - Update the instance count and the total, minimum, and maximum durations. 284 284 Finally, print the gathered cumulative statistics. 285 285 286 286 **/ 287 287 VOID … … 290 290 ); 291 291 292 /** 292 /** 293 293 Gather and print ALL Profiling Records. 294 294 295 295 Displays all "interesting" Profile measurements in order. 296 296 The number of records displayed is controlled by: … … 299 299 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 300 300 displayed. 301 301 302 302 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 303 303 The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. 304 304 They must not be in use by a calling function. 305 305 306 306 @param[in] Limit The number of records to print. Zero is ALL. 307 307 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 308 308 309 309 **/ 310 310 VOID … … 314 314 ); 315 315 316 /** 316 /** 317 317 Gather and print Raw Profile Records. 318 318 319 319 All Profile measurements with a duration greater than or equal to 320 320 mInterestThreshold are printed without interpretation. 321 321 322 322 The number of records displayed is controlled by: 323 323 - records with a duration less than mInterestThreshold microseconds are not displayed. … … 325 325 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 326 326 displayed. 327 327 328 328 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 329 329 330 330 @param[in] Limit The number of records to print. Zero is ALL. 331 331 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 332 332 333 333 **/ 334 334 VOID -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiDpLib/DpProfile.c
r58464 r58466 30 30 #include "DpInternal.h" 31 31 32 /** 32 /** 33 33 Gather and print ALL Profiling Records. 34 34 35 35 Displays all "interesting" Profile measurements in order. 36 36 The number of records displayed is controlled by: … … 39 39 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 40 40 displayed. 41 41 42 42 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 43 43 The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. 44 44 They must not be in use by a calling function. 45 45 46 46 @param[in] Limit The number of records to print. Zero is ALL. 47 47 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 48 48 49 49 **/ 50 50 VOID … … 57 57 EFI_STRING StringPtrUnknown; 58 58 59 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 59 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 60 60 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_PROFILE), NULL); 61 61 62 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, 62 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, 63 63 (StringPtr == NULL) ? StringPtrUnknown: StringPtr); 64 64 FreePool (StringPtr); … … 66 66 } 67 67 68 /** 68 /** 69 69 Gather and print Raw Profile Records. 70 70 71 71 All Profile measurements with a duration greater than or equal to 72 72 mInterestThreshold are printed without interpretation. 73 73 74 74 The number of records displayed is controlled by: 75 75 - records with a duration less than mInterestThreshold microseconds are not displayed. … … 77 77 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 78 78 displayed. 79 79 80 80 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 81 81 82 82 @param[in] Limit The number of records to print. Zero is ALL. 83 83 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 84 84 85 85 **/ 86 86 VOID … … 95 95 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 96 96 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWPROFILE), NULL); 97 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, 97 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, 98 98 (StringPtr == NULL) ? StringPtrUnknown: StringPtr); 99 99 FreePool (StringPtr); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiDpLib/DpTrace.c
r58464 r58466 30 30 #include "DpInternal.h" 31 31 32 /** 32 /** 33 33 Collect verbose statistics about the logged performance measurements. 34 34 35 35 General Summary information for all Trace measurements is gathered and 36 36 stored within the SummaryData structure. This information is both 37 37 used internally by subsequent reporting functions, and displayed 38 38 at the end of verbose reports. 39 39 40 40 @pre The SummaryData and CumData structures must be initialized 41 41 prior to calling this function. 42 42 43 43 @post The SummaryData and CumData structures contain statistics for the 44 44 current performance logs. … … 102 102 } 103 103 104 /** 104 /** 105 105 Gather and print ALL Trace Records. 106 106 107 107 Displays all "interesting" Trace measurements in order.<BR> 108 108 The number of records displayed is controlled by: … … 111 111 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 112 112 displayed. 113 113 114 114 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 115 115 The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. 116 116 They must not be in use by a calling function. 117 117 118 118 @param[in] Limit The number of records to print. Zero is ALL. 119 119 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 120 120 121 121 **/ 122 122 VOID … … 259 259 } 260 260 261 /** 261 /** 262 262 Gather and print Raw Trace Records. 263 263 264 264 All Trace measurements with a duration greater than or equal to 265 265 mInterestThreshold are printed without interpretation. 266 266 267 267 The number of records displayed is controlled by: 268 268 - records with a duration less than mInterestThreshold microseconds are not displayed. … … 270 270 - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not 271 271 displayed. 272 272 273 273 @pre The mInterestThreshold global variable is set to the shortest duration to be printed. 274 274 275 275 @param[in] Limit The number of records to print. Zero is ALL. 276 276 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 277 277 278 278 **/ 279 279 VOID … … 293 293 EFI_STRING StringPtrUnknown; 294 294 295 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 295 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 296 296 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWTRACE), NULL); 297 297 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, … … 358 358 } 359 359 360 /** 360 /** 361 361 Gather and print Major Phase metrics. 362 362 363 363 @param[in] Ticker The timer value for the END of Shell phase 364 364 365 365 **/ 366 366 VOID … … 388 388 DxeTime = 0; 389 389 BdsTime = 0; 390 ShellTime = 0; 390 ShellTime = 0; 391 391 // 392 392 // Get Execution Phase Statistics 393 393 // 394 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 394 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 395 395 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_PHASES), NULL); 396 396 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, … … 499 499 } 500 500 501 /** 501 /** 502 502 Gather and print Handle data. 503 503 504 504 @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. 505 505 506 506 @return Status from a call to gBS->LocateHandle(). 507 507 **/ … … 524 524 EFI_STRING StringPtrUnknown; 525 525 526 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 526 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 527 527 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_DRIVERS), NULL); 528 528 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, … … 619 619 } 620 620 621 /** 621 /** 622 622 Gather and print PEIM data. 623 623 624 624 Only prints complete PEIM records 625 625 626 626 **/ 627 627 VOID … … 638 638 EFI_STRING StringPtrUnknown; 639 639 640 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 640 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 641 641 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_PEIMS), NULL); 642 642 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, … … 693 693 } 694 694 695 /** 695 /** 696 696 Gather and print global data. 697 697 698 698 Strips out incomplete or "Execution Phase" records 699 699 Only prints records where Handle is NULL 700 700 Increment TIndex for every record, even skipped ones, so that we have an 701 701 indication of every measurement record taken. 702 702 703 703 **/ 704 704 VOID … … 715 715 EFI_STRING StringPtrUnknown; 716 716 717 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 717 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 718 718 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_GENERAL), NULL); 719 719 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, … … 775 775 } 776 776 777 /** 777 /** 778 778 Gather and print cumulative data. 779 779 780 780 Traverse the measurement records and:<BR> 781 781 For each record with a Token listed in the CumData array:<BR> 782 782 - Update the instance count and the total, minimum, and maximum durations. 783 783 Finally, print the gathered cumulative statistics. 784 784 785 785 **/ 786 786 VOID … … 797 797 EFI_STRING StringPtrUnknown; 798 798 799 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 799 StringPtrUnknown = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); 800 800 StringPtr = HiiGetString (gDpHiiHandle, STRING_TOKEN (STR_DP_SECTION_CUMULATIVE), NULL); 801 801 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_SECTION_HEADER), gDpHiiHandle, … … 815 815 MaxDur = DurationInMicroSeconds(CumData[TIndex].MaxDur); 816 816 MinDur = DurationInMicroSeconds(CumData[TIndex].MinDur); 817 817 818 818 ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DP_CUMULATIVE_STATS), gDpHiiHandle, 819 819 CumData[TIndex].Name, -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiDpLib/DpUtilities.c
r58464 r58466 40 40 #include "DpInternal.h" 41 41 42 /** 42 /** 43 43 Calculate an event's duration in timer ticks. 44 44 45 45 Given the count direction and the event's start and end timer values, 46 46 calculate the duration of the event in timer ticks. Information for 47 47 the current measurement is pointed to by the parameter. 48 48 49 49 If the measurement's start time is 1, it indicates that the developer 50 50 is indicating that the measurement began at the release of reset. 51 51 The start time is adjusted to the timer's starting count before performing 52 52 the elapsed time calculation. 53 53 54 54 The calculated duration, in ticks, is the absolute difference between 55 55 the measurement's ending and starting counts. 56 56 57 57 @param Measurement Pointer to a MEASUREMENT_RECORD structure containing 58 58 data for the current measurement. 59 59 60 60 @return The 64-bit duration of the event. 61 61 **/ … … 92 92 } 93 93 94 /** 94 /** 95 95 Determine whether the Measurement record is for an EFI Phase. 96 96 97 97 The Token and Module members of the measurement record are checked. 98 98 Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL. 99 99 100 100 @param[in] Measurement A pointer to the Measurement record to test. 101 101 102 102 @retval TRUE The measurement record is for an EFI Phase. 103 103 @retval FALSE The measurement record is NOT for an EFI Phase. … … 119 119 } 120 120 121 /** 121 /** 122 122 Get the file name portion of the Pdb File Name. 123 123 124 124 The portion of the Pdb File Name between the last backslash and 125 125 either a following period or the end of the string is converted 126 126 to Unicode and copied into UnicodeBuffer. The name is truncated, 127 127 if necessary, to ensure that UnicodeBuffer is not overrun. 128 128 129 129 @param[in] PdbFileName Pdb file name. 130 130 @param[out] UnicodeBuffer The resultant Unicode File Name. 131 131 132 132 **/ 133 133 VOID … … 172 172 } 173 173 174 /** 174 /** 175 175 Get a human readable name for an image handle. 176 176 The following methods will be tried orderly: … … 339 339 } 340 340 341 /** 341 /** 342 342 Calculate the Duration in microseconds. 343 343 344 344 Duration is multiplied by 1000, instead of Frequency being divided by 1000 or 345 345 multiplying the result by 1000, in order to maintain precision. Since Duration is 346 346 a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow. 347 347 348 348 The time is calculated as (Duration * 1000) / Timer_Frequency. 349 349 350 350 @param[in] Duration The event duration in timer ticks. 351 351 352 352 @return A 64-bit value which is the Elapsed time in microseconds. 353 353 **/ … … 363 363 } 364 364 365 /** 365 /** 366 366 Get index of Measurement Record's match in the CumData array. 367 367 368 368 If the Measurement's Token value matches a Token in one of the CumData 369 369 records, the index of the matching record is returned. The returned 370 370 index is a signed value so that negative values can indicate that 371 371 the Measurement didn't match any entry in the CumData array. 372 372 373 373 @param[in] Measurement A pointer to a Measurement Record to match against the CumData array. 374 374 375 375 @retval <0 Token is not in the CumData array. 376 376 @retval >=0 Return value is the index into CumData where Token is found. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
r58459 r58466 109 109 } 110 110 111 /** 111 /** 112 112 Initialization function for HII packages. 113 113 114 114 **/ 115 115 VOID … … 221 221 LoadedImage->Unload); 222 222 223 223 224 224 SHELL_FREE_NON_NULL(Temp); 225 225 SHELL_FREE_NON_NULL(CodeType); … … 299 299 GraphicsOutput->Mode->Info->PixelFormat!=PixelBitMask?0:GraphicsOutput->Mode->Info->PixelInformation.BlueMask 300 300 ); 301 301 302 302 SHELL_FREE_NON_NULL(Temp); 303 303 SHELL_FREE_NON_NULL(Fmt); … … 355 355 RetVal = Temp2; 356 356 Temp2 = NULL; 357 357 358 358 Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_SEG), NULL); 359 359 ASSERT (Temp != NULL); … … 369 369 if (!EFI_ERROR(Status)) { 370 370 Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_ATT), NULL); 371 ASSERT (Temp != NULL); 371 ASSERT (Temp != NULL); 372 372 Temp2 = CatSPrint(RetVal, Temp, Attributes); 373 373 FreePool(Temp); … … 375 375 RetVal = Temp2; 376 376 Temp2 = NULL; 377 377 378 378 Temp = HiiGetString(mHandleParsingHiiHandle, STRING_TOKEN(STR_PCIRB_DUMP_SUPPORTS), NULL); 379 379 ASSERT (Temp != NULL); … … 416 416 } 417 417 418 Temp2 = CatSPrint(RetVal, 418 Temp2 = CatSPrint(RetVal, 419 419 L"%H%02x %016lx %016lx %02x%N\r\n", 420 420 Configuration->SpecificFlag, … … 1056 1056 /** 1057 1057 Get best support language for this driver. 1058 1059 First base on the user input language to search, second base on the current 1060 platform used language to search, third get the first language from the 1058 1059 First base on the user input language to search, second base on the current 1060 platform used language to search, third get the first language from the 1061 1061 support language list. The caller need to free the buffer of the best language. 1062 1062 … … 1456 1456 if (ControllerHandle == NULL) { 1457 1457 // 1458 // ControllerHandle == NULL and DriverBindingHandle != NULL. 1458 // ControllerHandle == NULL and DriverBindingHandle != NULL. 1459 1459 // Return information on all the controller handles that the driver specified by DriverBindingHandle is managing 1460 1460 // … … 2004 2004 2005 2005 // 2006 // No handles were found... 2006 // No handles were found... 2007 2007 // 2008 2008 if (TotalSize == sizeof(EFI_HANDLE)) { -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
r58464 r58466 92 92 EFIAPI 93 93 UpdateOptionalData( 94 UINT16 Index, 95 UINTN DataSize, 94 UINT16 Index, 95 UINTN DataSize, 96 96 UINT8 *Data, 97 97 IN CONST BCFG_OPERATION_TARGET Target … … 107 107 108 108 UnicodeSPrint(VariableName, sizeof(VariableName), L"%s%04x", Target == BcfgTargetBootOrder?L"Boot":L"Driver", Index); 109 109 110 110 OriginalSize = 0; 111 111 OriginalData = NULL; … … 154 154 // 155 155 Status = gRT->SetVariable( 156 VariableName, 156 VariableName, 157 157 (EFI_GUID*)&gEfiGlobalVariableGuid, 158 158 EFI_VARIABLE_NON_VOLATILE|EFI_VARIABLE_BOOTSERVICE_ACCESS|EFI_VARIABLE_RUNTIME_ACCESS, … … 178 178 EFIAPI 179 179 GetBootOptionCrc( 180 UINT32 *Crc, 180 UINT32 *Crc, 181 181 UINT16 BootIndex 182 182 ) … … 810 810 811 811 // 812 // determine whether we have file with data, quote delimited information, or a hot-key 812 // determine whether we have file with data, quote delimited information, or a hot-key 813 813 // 814 814 if (Walker[0] == L'\"') { … … 886 886 if (ShellStatus == SHELL_SUCCESS) { 887 887 // 888 // Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct. 888 // Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct. 889 889 // Re-allocate with the added information. 890 890 // … … 941 941 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellBcfgHiiHandle, L"Option Index"); 942 942 ShellStatus = SHELL_INVALID_PARAMETER; 943 } 943 } 944 944 } 945 945 … … 965 965 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, VariableName, Status); 966 966 ShellStatus = SHELL_INVALID_PARAMETER; 967 } 967 } 968 968 } else { 969 969 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_VAR_NO_NUM), gShellBcfgHiiHandle); … … 1010 1010 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, VariableName, Status); 1011 1011 ShellStatus = SHELL_INVALID_PARAMETER; 1012 } 1012 } 1013 1013 } 1014 1014 if (EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS) { 1015 1015 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, VariableName, Status); 1016 1016 ShellStatus = SHELL_INVALID_PARAMETER; 1017 } 1017 } 1018 1018 } 1019 1019 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
r58459 r58466 41 41 gEfiShellParametersProtocolGuid ## CONSUMES 42 42 gEfiShellInterfaceGuid ## SOMETIMES_CONSUMES 43 44 43 44 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
r58459 r58466 239 239 // not found or out of resources 240 240 // 241 return NULL; 241 return NULL; 242 242 } 243 243 … … 256 256 gUnicodeCollation, 257 257 (CHAR16*)CommandString, 258 (CHAR16*)DynamicCommand->CommandName) == 0 258 (CHAR16*)DynamicCommand->CommandName) == 0 259 259 ){ 260 260 FreePool(CommandHandleList); … … 360 360 // TODO: how to get proper language? 361 361 // 362 return DynamicCommand->GetHelp(DynamicCommand, "en"); 362 return DynamicCommand->GetHelp(DynamicCommand, "en"); 363 363 } 364 364 … … 774 774 ALIAS_LIST *Node; 775 775 ALIAS_LIST *CommandAlias; 776 ALIAS_LIST *PrevCommandAlias; 776 ALIAS_LIST *PrevCommandAlias; 777 777 INTN LexicalMatchValue; 778 778 … … 814 814 // Swap PrevCommandAlias and CommandAlias list entry if PrevCommandAlias list entry 815 815 // is alphabetically greater than CommandAlias list entry 816 // 816 // 817 817 if (LexicalMatchValue > 0) { 818 818 CommandAlias = (ALIAS_LIST *) SwapListEntries (&PrevCommandAlias->Link, &CommandAlias->Link); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c
r58459 r58466 184 184 /** 185 185 Allocate memory spaces for data structures used in compression process. 186 186 187 187 @retval EFI_SUCCESS Memory was allocated successfully. 188 188 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. … … 756 756 /** 757 757 Assign code to each symbol based on the code length array. 758 758 759 759 @param[in] LoopVar8 The number of symbols. 760 760 @param[in] Len The code length array. … … 781 781 } 782 782 } 783 783 784 784 /** 785 785 Generates Huffman codes given a frequency distribution of symbols. … … 1201 1201 Outputs an Original Character or a Pointer. 1202 1202 1203 @param[in] LoopVar5 The original character or the 'String Length' element of 1203 @param[in] LoopVar5 The original character or the 'String Length' element of 1204 1204 a Pointer. 1205 1205 @param[in] LoopVar7 The 'Position' field of a Pointer. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Dblk.c
r48674 r58466 63 63 if (!EFI_ERROR(Status) && Buffer != NULL) { 64 64 ShellPrintHiiEx( 65 -1, 66 -1, 67 NULL, 68 STRING_TOKEN (STR_DBLK_HEADER), 69 gShellDebug1HiiHandle, 65 -1, 66 -1, 67 NULL, 68 STRING_TOKEN (STR_DBLK_HEADER), 69 gShellDebug1HiiHandle, 70 70 Lba, 71 71 BufferSize, … … 175 175 } 176 176 } 177 177 178 178 if (ShellStatus == SHELL_SUCCESS) { 179 179 // -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
r58459 r58466 153 153 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, Temp1); 154 154 ShellStatus = SHELL_INVALID_PARAMETER; 155 } 155 } 156 156 Temp1 = ShellCommandLineGetRawValue(Package, 2); 157 157 if (Temp1 == NULL) { … … 199 199 } 200 200 201 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_SYSTEM_TABLE), gShellDebug1HiiHandle, 201 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_SYSTEM_TABLE), gShellDebug1HiiHandle, 202 202 (UINT64)(UINTN)Address, 203 203 gST->Hdr.HeaderSize, -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
r58459 r58466 1 1 /** @file 2 2 Main file for DmpStore shell Debug1 function. 3 3 4 4 (C) Copyright 2013-2014, Hewlett-Packard Development Company, L.P. 5 5 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR> … … 53 53 BufLen = 0; 54 54 RetString = NULL; 55 55 56 56 if ((Atts & EFI_VARIABLE_NON_VOLATILE) != 0) { 57 57 StrnCatGrow (&RetString, &BufLen, L"+NV", 0); … … 123 123 return SHELL_DEVICE_ERROR; 124 124 } 125 125 126 126 ShellStatus = SHELL_SUCCESS; 127 127 128 128 InitializeListHead (&List); 129 129 130 130 Position = 0; 131 131 while (Position < FileSize) { … … 186 186 187 187 Position += BufferSize + sizeof (Crc32); 188 188 189 189 Variable = AllocateZeroPool (sizeof (*Variable) + NameSize + DataSize); 190 190 if (Variable == NULL) { … … 205 205 FreePool (Buffer); 206 206 } 207 207 208 208 if ((Position != FileSize) || (ShellStatus != SHELL_SUCCESS)) { 209 209 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_BAD_FILE), gShellDebug1HiiHandle); … … 212 212 } 213 213 } 214 214 215 215 for ( Link = GetFirstNode (&List) 216 216 ; !IsNull (&List, Link) && (ShellStatus == SHELL_SUCCESS) … … 218 218 ) { 219 219 Variable = CR (Link, DMP_STORE_VARIABLE, Link, DMP_STORE_VARIABLE_SIGNATURE); 220 220 221 221 if (((Name == NULL) || gUnicodeCollation->MetaiMatch (gUnicodeCollation, Variable->Name, (CHAR16 *) Name)) && 222 222 ((Guid == NULL) || CompareGuid (&Variable->Guid, Guid)) … … 335 335 FreePool (Buffer); 336 336 337 if (!EFI_ERROR (Status) && 337 if (!EFI_ERROR (Status) && 338 338 (BufferSize != sizeof (NameSize) + sizeof (DataSize) + sizeof (*Guid) + sizeof (Attributes) + NameSize + DataSize) 339 339 ) { 340 340 Status = EFI_DEVICE_ERROR; 341 341 } 342 342 343 343 return Status; 344 344 } … … 347 347 Recursive function to display or delete variables. 348 348 349 This function will call itself to create a stack-based list of allt he variables to process, 349 This function will call itself to create a stack-based list of allt he variables to process, 350 350 then fromt he last to the first, they will do either printing or deleting. 351 351 … … 441 441 // Only continue if Guid and VariableName are each either NULL or a match 442 442 // 443 if ( ( Name == NULL 443 if ( ( Name == NULL 444 444 || gUnicodeCollation->MetaiMatch(gUnicodeCollation, FoundVarName, (CHAR16*) Name) ) 445 && ( Guid == NULL 445 && ( Guid == NULL 446 446 || CompareGuid(&FoundVarGuid, Guid) ) 447 447 ) { … … 572 572 } else if (Name == NULL && Guid != NULL) { 573 573 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_G), gShellDebug1HiiHandle, Guid); 574 } 574 } 575 575 return (SHELL_NOT_FOUND); 576 576 } -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/Edit.c
r48674 r58466 86 86 gEfiShellProtocol->SetCurDir(NULL, Nfs); 87 87 FreePool(Nfs); 88 } 88 } 89 89 } 90 90 } -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
r58459 r58466 54 54 // the whole edit area needs to be refreshed 55 55 // 56 BOOLEAN FileBufferNeedRefresh; 56 BOOLEAN FileBufferNeedRefresh; 57 57 58 58 // … … 147 147 /** 148 148 Advance to the next Count lines 149 149 150 150 @param[in] Count The line number to advance by. 151 151 @param[in] CurrentLine The pointer to the current line structure. … … 187 187 /** 188 188 Retreat to the previous Count lines. 189 189 190 190 @param[in] Count The line number to retreat by. 191 191 @param[in] CurrentLine The pointer to the current line structure. … … 227 227 /** 228 228 Advance/Retreat lines 229 229 230 230 @param[in] Count line number to advance/retreat 231 231 >0 : advance … … 492 492 CHAR16 *PrintLine; 493 493 CHAR16 *PrintLine2; 494 UINTN BufLen; 494 UINTN BufLen; 495 495 496 496 // … … 722 722 723 723 @param Str The file name to set. 724 724 725 725 @retval EFI_SUCCESS The filename was successfully set. 726 726 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. … … 777 777 /** 778 778 Read a file from disk into the FileBuffer. 779 779 780 780 @param[in] FileName The filename to read. 781 781 @param[in] Recover TRUE if is for recover mode, no information printouts. 782 782 783 783 @retval EFI_SUCCESS The load was successful. 784 784 @retval EFI_LOAD_ERROR The load failed. … … 838 838 839 839 Info = ShellGetFileInfo(FileHandle); 840 840 841 841 if (Info->Attribute & EFI_FILE_DIRECTORY) { 842 842 StatusBarSetStatusString (L"Directory Can Not Be Edited"); … … 1414 1414 1415 1415 @retval EFI_SUCCESS Data was written. 1416 @retval EFI_LOAD_ERROR 1416 @retval EFI_LOAD_ERROR 1417 1417 @retval EFI_OUT_OF_RESOURCES There were not enough resources to write the file. 1418 1418 **/ … … 1490 1490 return EFI_LOAD_ERROR; 1491 1491 } 1492 1492 1493 1493 if (Info != NULL) { 1494 1494 Attribute = Info->Attribute & ~EFI_FILE_READ_ONLY; … … 1568 1568 Status = ShellWriteFile (FileHandle, &Size, Cache); 1569 1569 if (EFI_ERROR (Status)) { 1570 ShellDeleteFile (&FileHandle); 1570 ShellDeleteFile (&FileHandle); 1571 1571 FreePool (Cache); 1572 1572 return EFI_LOAD_ERROR; … … 1934 1934 1935 1935 /** 1936 Delete current character from current line. This is the effect caused 1936 Delete current character from current line. This is the effect caused 1937 1937 by the 'del' key. 1938 1938 … … 2048 2048 Insert a char into line 2049 2049 2050 2050 2051 2051 @param[in] Line The line to insert into. 2052 2052 @param[in] Char The char to insert. … … 2428 2428 } 2429 2429 2430 /** 2430 /** 2431 2431 Dispatch input to different handler 2432 2432 @param[in] Key The input key. One of: … … 2648 2648 /** 2649 2649 Advance/Retreat lines and set CurrentLine in FileBuffer to it 2650 2650 2651 2651 @param[in] Count The line number to advance/retreat 2652 2652 >0 : advance … … 2796 2796 Cut current line out and return a pointer to it. 2797 2797 2798 @param[out] CutLine Upon a successful return pointer to the pointer to 2798 @param[out] CutLine Upon a successful return pointer to the pointer to 2799 2799 the allocated cut line. 2800 2800 … … 2973 2973 Column = 0; 2974 2974 Position = 0; 2975 2975 2976 2976 // 2977 2977 // search if in current line … … 2992 2992 Position = CharPos - Current + 1; 2993 2993 Found = TRUE; 2994 } 2994 } 2995 2995 2996 2996 // … … 3014 3014 Position = CharPos - Line->Buffer + 1; 3015 3015 Found = TRUE; 3016 } 3017 3016 } 3017 3018 3018 if (Found) { 3019 3019 // -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.h
r48674 r58466 54 54 ); 55 55 56 /** 56 /** 57 57 Dispatch input to different handler 58 58 @param[in] Key The input key. One of: … … 105 105 106 106 @param Str The file name to set. 107 107 108 108 @retval EFI_SUCCESS The filename was successfully set. 109 109 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. … … 118 118 /** 119 119 Read a file from disk into the FileBuffer. 120 120 121 121 @param[in] FileName The filename to read. 122 122 @param[in] Recover TRUE if is for recover mode, no information printouts. 123 123 124 124 @retval EFI_SUCCESS The load was successful. 125 125 @retval EFI_LOAD_ERROR The load failed. … … 140 140 141 141 @retval EFI_SUCCESS Data was written. 142 @retval EFI_LOAD_ERROR 142 @retval EFI_LOAD_ERROR 143 143 @retval EFI_OUT_OF_RESOURCES There were not enough resources to write the file. 144 144 **/ … … 165 165 Cut current line out and return a pointer to it. 166 166 167 @param[out] CutLine Upon a successful return pointer to the pointer to 167 @param[out] CutLine Upon a successful return pointer to the pointer to 168 168 the allocated cut line. 169 169 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
r58459 r58466 78 78 Save current file to disk, you can save to current file name or 79 79 save to another file name. 80 80 81 81 @retval EFI_SUCCESS The file was saved correctly. 82 82 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. … … 1137 1137 Save current file to disk, you can save to current file name or 1138 1138 save to another file name. 1139 1139 1140 1140 @retval EFI_SUCCESS The file was saved correctly. 1141 1141 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. … … 1151 1151 BOOLEAN OldFile; 1152 1152 CHAR16 *Str; 1153 SHELL_FILE_HANDLE FileHandle; 1153 SHELL_FILE_HANDLE FileHandle; 1154 1154 EFI_FILE_INFO *Info; 1155 1155 … … 1281 1281 FreePool (FileName); 1282 1282 return EFI_SUCCESS; 1283 } 1283 } 1284 1284 1285 1285 Info = ShellGetFileInfo(FileHandle); … … 1288 1288 FreePool (FileName); 1289 1289 return (EFI_SUCCESS); 1290 } 1291 1290 } 1291 1292 1292 if (Info->Attribute & EFI_FILE_READ_ONLY) { 1293 1293 StatusBarSetStatusString (L"Access Denied - Read Only"); … … 1364 1364 CHAR16 *InfoString; 1365 1365 EFI_INPUT_KEY Key; 1366 1367 // 1368 // print helpInfo 1366 1367 // 1368 // print helpInfo 1369 1369 // 1370 1370 for (CurrentLine = 0; 0 != MainMenuHelpInfo[CurrentLine]; CurrentLine++) { 1371 1371 InfoString = HiiGetString(gShellDebug1HiiHandle, MainMenuHelpInfo[CurrentLine], NULL); 1372 ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString); 1373 } 1374 1372 ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString); 1373 } 1374 1375 1375 // 1376 1376 // scan for ctrl+w … … 1378 1378 do { 1379 1379 gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); 1380 } while(SCAN_CONTROL_W != Key.UnicodeChar); 1380 } while(SCAN_CONTROL_W != Key.UnicodeChar); 1381 1381 1382 1382 // … … 1386 1386 FileBufferNeedRefresh = TRUE; 1387 1387 FileBufferOnlyLineNeedRefresh = FALSE; 1388 FileBufferRefresh (); 1388 FileBufferRefresh (); 1389 1389 1390 1390 return EFI_SUCCESS; … … 1610 1610 // call the components refresh function 1611 1611 // 1612 if (EditorFirst 1613 || StrCmp (FileBufferBackupVar.FileName, FileBuffer.FileName) != 0 1614 || FileBufferBackupVar.FileType != FileBuffer.FileType 1615 || FileBufferBackupVar.FileModified != FileBuffer.FileModified 1612 if (EditorFirst 1613 || StrCmp (FileBufferBackupVar.FileName, FileBuffer.FileName) != 0 1614 || FileBufferBackupVar.FileType != FileBuffer.FileType 1615 || FileBufferBackupVar.FileModified != FileBuffer.FileModified 1616 1616 || FileBufferBackupVar.ReadOnly != FileBuffer.ReadOnly) { 1617 1617 … … 1621 1621 } 1622 1622 if (EditorFirst 1623 || FileBufferBackupVar.FilePosition.Row != FileBuffer.FilePosition.Row 1624 || FileBufferBackupVar.FilePosition.Column != FileBuffer.FilePosition.Column 1623 || FileBufferBackupVar.FilePosition.Row != FileBuffer.FilePosition.Row 1624 || FileBufferBackupVar.FilePosition.Column != FileBuffer.FilePosition.Column 1625 1625 || FileBufferBackupVar.ModeInsert != FileBuffer.ModeInsert 1626 1626 || StatusBarGetRefresh()) { … … 1861 1861 } else { 1862 1862 StatusBarSetStatusString (L"Unknown Command"); 1863 FileBufferMouseNeedRefresh = FALSE; 1864 } 1865 1863 FileBufferMouseNeedRefresh = FALSE; 1864 } 1865 1866 1866 if (Status != EFI_SUCCESS && Status != EFI_OUT_OF_RESOURCES) { 1867 1867 // … … 1931 1931 { 1932 1932 FileBufferBackup (); 1933 1933 1934 1934 return EFI_SUCCESS; 1935 1935 } -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c
r58459 r58466 242 242 243 243 mReturnString[Size] = CHAR_NULL; 244 244 245 245 246 246 // -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c
r48674 r58466 50 50 51 51 for (NumItems = 0, ItemsWalker = Items ; ItemsWalker != NULL && ItemsWalker->Function != NULL ; ItemsWalker++,NumItems++); 52 52 53 53 MenuItems = AllocateZeroPool((NumItems+1) * sizeof(EDITOR_MENU_ITEM)); 54 54 if (MenuItems == NULL) { … … 73 73 { 74 74 ControlBasedMenuFunctions = Items; 75 return EFI_SUCCESS; 75 return EFI_SUCCESS; 76 76 } 77 77 /** … … 143 143 @param[in] Key The pressed key. 144 144 145 @retval EFI_NOT_FOUND The key was not a valid function key 145 @retval EFI_NOT_FOUND The key was not a valid function key 146 146 (an error was sent to the status bar). 147 147 @return The return value from the called dispatch function. … … 173 173 @param[in] Key The pressed key. 174 174 175 @retval EFI_NOT_FOUND The key was not a valid control-based key 175 @retval EFI_NOT_FOUND The key was not a valid control-based key 176 176 (an error was sent to the status bar). 177 177 @return EFI_SUCCESS. … … 183 183 ) 184 184 { 185 185 186 186 if ((SCAN_CONTROL_Z < Key->UnicodeChar) 187 187 ||(NULL == ControlBasedMenuFunctions[Key->UnicodeChar])) -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h
r48674 r58466 98 98 @param[in] Key The pressed key. 99 99 100 @retval EFI_NOT_FOUND The key was not a valid function key 100 @retval EFI_NOT_FOUND The key was not a valid function key 101 101 (an error was sent to the status bar). 102 102 @return The return value from the called dispatch function. … … 113 113 @param[in] Key The pressed key. 114 114 115 @retval EFI_NOT_FOUND The key was not a valid control-based key 115 @retval EFI_NOT_FOUND The key was not a valid control-based key 116 116 (an error was sent to the status bar). 117 117 @return EFI_SUCCESS. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.c
r58459 r58466 74 74 Cause the status bar to refresh it's printing on the screen. 75 75 76 @param[in] EditorFirst TRUE to indicate the first launch of the editor. 76 @param[in] EditorFirst TRUE to indicate the first launch of the editor. 77 77 FALSE otherwise. 78 78 @param[in] LastRow LastPrintable row. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EditStatusBar.h
r48674 r58466 41 41 Cause the status bar to refresh it's printing on the screen. 42 42 43 @param[in] EditorFirst TRUE to indicate the first launch of the editor. 43 @param[in] EditorFirst TRUE to indicate the first launch of the editor. 44 44 FALSE otherwise. 45 45 @param[in] LastRow LastPrintable row. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/EfiDecompress.c
r58459 r58466 156 156 } 157 157 } 158 } 158 } 159 159 } 160 160 } -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.c
r58459 r58466 2 2 Defines HBufferImage - the view of the file that is visible at any point, 3 3 as well as the event handlers for editing the file 4 4 5 5 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved. <BR> 6 6 This program and the accompanying materials … … 139 139 140 140 /** 141 Backup function for HBufferImage. Only a few fields need to be backup. 141 Backup function for HBufferImage. Only a few fields need to be backup. 142 142 This is for making the file buffer refresh as few as possible. 143 143 … … 191 191 CurrentLine 192 192 NumLines 193 ListHead 193 ListHead 194 194 195 195 @retval EFI_SUCCESS The operation was successful. … … 948 948 Status = HMemImageRead (MemOffset, MemSize, Recover); 949 949 break; 950 950 951 951 default: 952 952 Status = EFI_NOT_FOUND; … … 1015 1015 Status = HMemImageSave (MemOffset, MemSize); 1016 1016 break; 1017 1017 1018 1018 default: 1019 1019 Status = EFI_NOT_FOUND; … … 1032 1032 Fields affected: 1033 1033 NumLines 1034 Lines 1034 Lines 1035 1035 1036 1036 @retval NULL create line failed. … … 1374 1374 1375 1375 @param[in] FileRow Row of file position ( start from 1 ). 1376 1376 1377 1377 @retval TRUE It is above the current screen. 1378 1378 @retval FALSE It is not above the current screen. … … 1886 1886 /** 1887 1887 Delete character from buffer. 1888 1888 1889 1889 @param[in] Pos Position, Pos starting from 0. 1890 1890 @param[in] Count The Count of characters to delete. 1891 1891 @param[out] DeleteBuffer The DeleteBuffer. 1892 1892 1893 @retval EFI_SUCCESS Success 1893 @retval EFI_SUCCESS Success 1894 1894 **/ 1895 1895 EFI_STATUS … … 2020 2020 @param[in] AddBuffer Add buffer. 2021 2021 2022 @retval EFI_SUCCESS Success. 2022 @retval EFI_SUCCESS Success. 2023 2023 **/ 2024 2024 EFI_STATUS … … 2173 2173 /** 2174 2174 Change the raw buffer to a list of lines for the UI. 2175 2175 2176 2176 @param[in] Buffer The pointer to the buffer to fill. 2177 2177 @param[in] Bytes The size of the buffer in bytes. … … 2239 2239 /** 2240 2240 Change the list of lines from the UI to a raw buffer. 2241 2241 2242 2242 @param[in] Buffer The pointer to the buffer to fill. 2243 2243 @param[in] Bytes The size of the buffer in bytes. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/BufferImage.h
r48674 r58466 1 1 /** @file 2 Defines BufferImage - the view of the file that is visible at any point, 2 Defines BufferImage - the view of the file that is visible at any point, 3 3 as well as the event handlers for editing the file 4 4 5 5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 6 6 This program and the accompanying materials … … 73 73 74 74 /** 75 Backup function for HBufferImage. Only a few fields need to be backup. 75 Backup function for HBufferImage. Only a few fields need to be backup. 76 76 This is for making the file buffer refresh as few as possible. 77 77 … … 153 153 Fields affected: 154 154 NumLines 155 Lines 155 Lines 156 156 157 157 @retval NULL create line failed. … … 176 176 /** 177 177 Delete character from buffer. 178 178 179 179 @param[in] Pos Position, Pos starting from 0. 180 180 @param[in] Count The Count of characters to delete. 181 181 @param[out] DeleteBuffer The DeleteBuffer. 182 182 183 @retval EFI_SUCCESS Success 183 @retval EFI_SUCCESS Success 184 184 **/ 185 185 EFI_STATUS … … 197 197 @param[in] AddBuffer Add buffer. 198 198 199 @retval EFI_SUCCESS Success. 199 @retval EFI_SUCCESS Success. 200 200 **/ 201 201 EFI_STATUS … … 208 208 /** 209 209 Change the raw buffer to a list of lines for the UI. 210 210 211 211 @param[in] Buffer The pointer to the buffer to fill. 212 212 @param[in] Bytes The size of the buffer in bytes. … … 224 224 /** 225 225 Change the list of lines from the UI to a raw buffer. 226 226 227 227 @param[in] Buffer The pointer to the buffer to fill. 228 228 @param[in] Bytes The size of the buffer in bytes. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Clipboard.c
r48674 r58466 1 1 /** @file 2 2 Functions to deal with Clip Board 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Clipboard.h
r48674 r58466 1 1 /** @file 2 Defines DiskImage - the view of the file that is visible at any point, 2 Defines DiskImage - the view of the file that is visible at any point, 3 3 as well as the event handlers for editing the file 4 4 5 5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 6 6 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.c
r58459 r58466 40 40 /** 41 41 Initialization function for HDiskImage. 42 42 43 43 @retval EFI_SUCCESS The operation was successful. 44 44 @retval EFI_LOAD_ERROR A load error occured. … … 60 60 61 61 /** 62 Backup function for HDiskImage. Only a few fields need to be backup. 62 Backup function for HDiskImage. Only a few fields need to be backup. 63 63 This is for making the Disk buffer refresh as few as possible. 64 64 … … 160 160 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. 161 161 @retval EFI_LOAD_ERROR A load error occured. 162 @retval EFI_INVALID_PARAMETER A parameter was invalid. 162 @retval EFI_INVALID_PARAMETER A parameter was invalid. 163 163 **/ 164 164 EFI_STATUS … … 332 332 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. 333 333 @retval EFI_LOAD_ERROR A load error occured. 334 @retval EFI_INVALID_PARAMETER A parameter was invalid. 334 @retval EFI_INVALID_PARAMETER A parameter was invalid. 335 335 **/ 336 336 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.h
r48674 r58466 1 1 /** @file 2 Defines DiskImage - the view of the file that is visible at any point, 2 Defines DiskImage - the view of the file that is visible at any point, 3 3 as well as the event handlers for editing the file 4 4 5 5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 6 6 This program and the accompanying materials … … 21 21 /** 22 22 Initialization function for HDiskImage. 23 23 24 24 @retval EFI_SUCCESS The operation was successful. 25 25 @retval EFI_LOAD_ERROR A load error occured. … … 41 41 42 42 /** 43 Backup function for HDiskImage. Only a few fields need to be backup. 43 Backup function for HDiskImage. Only a few fields need to be backup. 44 44 This is for making the Disk buffer refresh as few as possible. 45 45 … … 63 63 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. 64 64 @retval EFI_LOAD_ERROR A load error occured. 65 @retval EFI_INVALID_PARAMETER A parameter was invalid. 65 @retval EFI_INVALID_PARAMETER A parameter was invalid. 66 66 **/ 67 67 EFI_STATUS … … 84 84 @retval EFI_OUT_OF_RESOURCES A memory allocation failed. 85 85 @retval EFI_LOAD_ERROR A load error occured. 86 @retval EFI_INVALID_PARAMETER A parameter was invalid. 86 @retval EFI_INVALID_PARAMETER A parameter was invalid. 87 87 **/ 88 88 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.c
r48674 r58466 38 38 /** 39 39 Initialization function for HFileImage 40 40 41 41 @retval EFI_SUCCESS The operation was successful. 42 42 **/ … … 61 61 62 62 /** 63 Backup function for HFileImage. Only a few fields need to be backup. 63 Backup function for HFileImage. Only a few fields need to be backup. 64 64 This is for making the file buffer refresh as few as possible. 65 65 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/FileImage.h
r48674 r58466 1 1 /** @file 2 Defines FileImage - the view of the file that is visible at any point, 2 Defines FileImage - the view of the file that is visible at any point, 3 3 as well as the event handlers for editing the file 4 4 5 5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 6 6 This program and the accompanying materials … … 21 21 /** 22 22 Initialization function for HFileImage 23 23 24 24 @retval EFI_SUCCESS The operation was successful. 25 25 **/ … … 40 40 41 41 /** 42 Backup function for HFileImage. Only a few fields need to be backup. 42 Backup function for HFileImage. Only a few fields need to be backup. 43 43 This is for making the file buffer refresh as few as possible. 44 44 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
r58459 r58466 1 1 /** @file 2 2 Main entry point of editor 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditor.h
r48674 r58466 1 1 /** @file 2 2 Main include file for hex editor 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h
r58459 r58466 1 1 /** @file 2 2 data types that are used by editor 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
r58459 r58466 1 1 /** @file 2 Defines the Main Editor data type - 3 - Global variables 2 Defines the Main Editor data type - 3 - Global variables 4 4 - Instances of the other objects of the editor 5 5 - Main Interfaces 6 6 7 7 Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved. <BR> 8 8 This program and the accompanying materials … … 111 111 112 112 CurrentLine = 0; 113 // print helpInfo 113 // print helpInfo 114 114 for (CurrentLine = 0; 0 != HexMainMenuHelpInfo[CurrentLine]; CurrentLine++) { 115 115 InfoString = HiiGetString(gShellDebug1HiiHandle, HexMainMenuHelpInfo[CurrentLine] 116 116 , NULL); 117 ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString); 118 } 119 117 ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString); 118 } 119 120 120 // scan for ctrl+w 121 121 do { 122 122 gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); 123 } while(SCAN_CONTROL_W != Key.UnicodeChar); 123 } while(SCAN_CONTROL_W != Key.UnicodeChar); 124 124 125 125 // update screen with buffer's info … … 212 212 /** 213 213 Save current opened buffer. 214 If is file buffer, you can save to current file name or 214 If is file buffer, you can save to current file name or 215 215 save to another file name. 216 216 … … 342 342 // and remove the Modified flag in Title Bar. 343 343 // 344 Str = CatSPrint(NULL, 344 Str = CatSPrint(NULL, 345 345 L"File to Save: [%s]", 346 346 HMainEditor.BufferImage->FileImage->FileName … … 389 389 // 390 390 if (StrLen (InputBarGetString()) == 0) { 391 FileName = CatSPrint(NULL, 391 FileName = CatSPrint(NULL, 392 392 L"%s", 393 393 HMainEditor.BufferImage->FileImage->FileName … … 443 443 SHELL_FREE_NON_NULL (FileName); 444 444 return EFI_SUCCESS; 445 } 445 } 446 446 447 447 SHELL_FREE_NON_NULL(Info); … … 487 487 } // if opened existing file 488 488 } // if OldFile 489 489 490 490 // 491 491 // save file back to disk … … 1757 1757 1758 1758 StatusBarCleanup (); 1759 1759 1760 1760 InputBarCleanup (); 1761 1761 1762 1762 Status = HBufferImageCleanup (); 1763 1763 if (EFI_ERROR (Status)) { … … 1804 1804 if (HMainEditor.BufferImage->DiskImage != NULL && 1805 1805 HBufferImageBackupVar.DiskImage != NULL && 1806 (HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset || 1806 (HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset || 1807 1807 HMainEditor.BufferImage->DiskImage->Size != HBufferImageBackupVar.DiskImage->Size) ){ 1808 1808 NameChange = TRUE; … … 1811 1811 if (HMainEditor.BufferImage->MemImage != NULL && 1812 1812 HBufferImageBackupVar.MemImage != NULL && 1813 (HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset || 1813 (HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset || 1814 1814 HMainEditor.BufferImage->MemImage->Size != HBufferImageBackupVar.MemImage->Size) ){ 1815 1815 NameChange = TRUE; 1816 1816 } 1817 1817 } else if (HMainEditor.BufferImage->BufferType == FileTypeFileBuffer) { 1818 if ( HMainEditor.BufferImage->FileImage != NULL && 1819 HMainEditor.BufferImage->FileImage->FileName != NULL && 1820 HBufferImageBackupVar.FileImage != NULL && 1821 HBufferImageBackupVar.FileImage->FileName != NULL && 1818 if ( HMainEditor.BufferImage->FileImage != NULL && 1819 HMainEditor.BufferImage->FileImage->FileName != NULL && 1820 HBufferImageBackupVar.FileImage != NULL && 1821 HBufferImageBackupVar.FileImage->FileName != NULL && 1822 1822 StrCmp (HMainEditor.BufferImage->FileImage->FileName, HBufferImageBackupVar.FileImage->FileName) != 0 ) { 1823 1823 NameChange = TRUE; 1824 1824 } 1825 1825 } 1826 if ( HMainEditor.BufferImage->FileImage != NULL && 1827 HBufferImageBackupVar.FileImage != NULL && 1826 if ( HMainEditor.BufferImage->FileImage != NULL && 1827 HBufferImageBackupVar.FileImage != NULL && 1828 1828 HMainEditor.BufferImage->FileImage->ReadOnly != HBufferImageBackupVar.FileImage->ReadOnly ) { 1829 1829 ReadChange = TRUE; … … 1839 1839 // call the components refresh function 1840 1840 // 1841 if (HEditorFirst 1841 if (HEditorFirst 1842 1842 || NameChange 1843 || HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType 1844 || HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified 1843 || HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType 1844 || HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified 1845 1845 || ReadChange ) { 1846 1846 … … 1858 1858 } 1859 1859 if (HEditorFirst 1860 || HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row 1861 || HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column 1860 || HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row 1861 || HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column 1862 1862 || StatusBarGetRefresh()) { 1863 1863 … … 2275 2275 OldSize = HBufferImage.MemImage->Size; 2276 2276 break; 2277 2277 2278 2278 default: 2279 2279 OldSize = 0; -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.h
r48674 r58466 1 1 /** @file 2 Defines the Main Editor data type - 3 - Global variables 2 Defines the Main Editor data type - 3 - Global variables 4 4 - Instances of the other objects of the editor 5 5 - Main Interfaces 6 6 7 7 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 8 8 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.c
r58459 r58466 1 1 /** @file 2 2 Functions to deal with Mem buffer 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 5 5 This program and the accompanying materials … … 129 129 130 130 /** 131 Backup function for HDiskImage. Only a few fields need to be backup. 131 Backup function for HDiskImage. Only a few fields need to be backup. 132 132 This is for making the Disk buffer refresh as few as possible. 133 133 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.h
r48674 r58466 1 1 /** @file 2 Defines MemImage - the view of the file that is visible at any point, 2 Defines MemImage - the view of the file that is visible at any point, 3 3 as well as the event handlers for editing the file 4 4 5 5 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 6 6 This program and the accompanying materials … … 31 31 32 32 /** 33 Backup function for HDiskImage. Only a few fields need to be backup. 33 Backup function for HDiskImage. Only a few fields need to be backup. 34 34 This is for making the Disk buffer refresh as few as possible. 35 35 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.c
r48674 r58466 1 1 /** @file 2 2 Implementation of various string and line routines 3 3 4 4 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR> 5 5 This program and the accompanying materials … … 19 19 /** 20 20 Free a line and it's internal buffer. 21 21 22 22 @param[in] Src The line to be freed. 23 23 **/ … … 110 110 @param[in] Count The line number to advance/retreat. 111 111 >0 : advance 112 <0: retreat 112 <0: retreat 113 113 114 114 @retval NULL An error occured. … … 183 183 CurrentLine 184 184 NumLines 185 ListHead 185 ListHead 186 186 187 187 @param[in] ListHead The list head. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/Misc.h
r48674 r58466 23 23 @param[in] Count The line number to advance/retreat. 24 24 >0 : advance 25 <0: retreat 25 <0: retreat 26 26 27 27 @retval NULL An error occured. … … 54 54 CurrentLine 55 55 NumLines 56 ListHead 56 ListHead 57 57 58 58 @param[in] ListHead The list head. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/LoadPciRom.c
r48674 r58466 239 239 240 240 // 241 // If the pointer to the PCI Data Structure is invalid, no further images can be located. 242 // The PCI Data Structure must be DWORD aligned. 241 // If the pointer to the PCI Data Structure is invalid, no further images can be located. 242 // The PCI Data Structure must be DWORD aligned. 243 243 // 244 244 if (EfiRomHeader->PcirOffset == 0 || -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
r58459 r58466 2054 2054 @param[in] CapabilityPtr The offset from the address to start. 2055 2055 @param[in] EnhancedDump The print format for the dump data. 2056 2056 2057 2057 @retval EFI_SUCCESS The command completed successfully. 2058 @retval @retval EFI_SUCCESS Pci express extend space IO is not suppoted. 2058 @retval @retval EFI_SUCCESS Pci express extend space IO is not suppoted. 2059 2059 **/ 2060 2060 EFI_STATUS … … 5041 5041 5042 5042 ShellPrintHiiEx( 5043 -1, -1, NULL, 5044 STRING_TOKEN (STR_PCI_EXT_CAP_LINK_CONTROL), 5045 gShellDebug1HiiHandle, 5043 -1, -1, NULL, 5044 STRING_TOKEN (STR_PCI_EXT_CAP_LINK_CONTROL), 5045 gShellDebug1HiiHandle, 5046 5046 Header->RootComplexLinkCapabilities, 5047 5047 Header->RootComplexLinkControl, 5048 5048 Header->RootComplexLinkStatus 5049 ); 5049 ); 5050 5050 DumpHex ( 5051 5051 4, … … 5074 5074 5075 5075 ShellPrintHiiEx( 5076 -1, -1, NULL, 5077 STRING_TOKEN (STR_PCI_EXT_CAP_POWER), 5078 gShellDebug1HiiHandle, 5076 -1, -1, NULL, 5077 STRING_TOKEN (STR_PCI_EXT_CAP_POWER), 5078 gShellDebug1HiiHandle, 5079 5079 Header->DataSelect, 5080 5080 Header->Data, 5081 5081 Header->PowerBudgetCapability 5082 ); 5082 ); 5083 5083 DumpHex ( 5084 5084 4, … … 5111 5111 5112 5112 ShellPrintHiiEx( 5113 -1, -1, NULL, 5114 STRING_TOKEN (STR_PCI_EXT_CAP_ACS), 5115 gShellDebug1HiiHandle, 5113 -1, -1, NULL, 5114 STRING_TOKEN (STR_PCI_EXT_CAP_ACS), 5115 gShellDebug1HiiHandle, 5116 5116 Header->AcsCapability, 5117 5117 Header->AcsControl 5118 ); 5118 ); 5119 5119 if (PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL(Header)) { 5120 5120 VectorSize = PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE(Header); … … 5124 5124 for (LoopCounter = 0 ; LoopCounter * 8 < VectorSize ; LoopCounter++) { 5125 5125 ShellPrintHiiEx( 5126 -1, -1, NULL, 5127 STRING_TOKEN (STR_PCI_EXT_CAP_ACS2), 5128 gShellDebug1HiiHandle, 5126 -1, -1, NULL, 5127 STRING_TOKEN (STR_PCI_EXT_CAP_ACS2), 5128 gShellDebug1HiiHandle, 5129 5129 LoopCounter + 1, 5130 5130 Header->EgressControlVectorArray[LoopCounter] 5131 ); 5131 ); 5132 5132 } 5133 5133 } … … 5158 5158 5159 5159 ShellPrintHiiEx( 5160 -1, -1, NULL, 5161 STRING_TOKEN (STR_PCI_EXT_CAP_LAT), 5162 gShellDebug1HiiHandle, 5160 -1, -1, NULL, 5161 STRING_TOKEN (STR_PCI_EXT_CAP_LAT), 5162 gShellDebug1HiiHandle, 5163 5163 Header->MaxSnoopLatency, 5164 5164 Header->MaxNoSnoopLatency 5165 ); 5165 ); 5166 5166 DumpHex ( 5167 5167 4, … … 5190 5190 5191 5191 ShellPrintHiiEx( 5192 -1, -1, NULL, 5193 STRING_TOKEN (STR_PCI_EXT_CAP_SN), 5194 gShellDebug1HiiHandle, 5192 -1, -1, NULL, 5193 STRING_TOKEN (STR_PCI_EXT_CAP_SN), 5194 gShellDebug1HiiHandle, 5195 5195 Header->SerialNumber 5196 ); 5196 ); 5197 5197 DumpHex ( 5198 5198 4, … … 5221 5221 5222 5222 ShellPrintHiiEx( 5223 -1, -1, NULL, 5224 STRING_TOKEN (STR_PCI_EXT_CAP_RCRB), 5225 gShellDebug1HiiHandle, 5223 -1, -1, NULL, 5224 STRING_TOKEN (STR_PCI_EXT_CAP_RCRB), 5225 gShellDebug1HiiHandle, 5226 5226 Header->VendorId, 5227 5227 Header->DeviceId, 5228 5228 Header->RcrbCapabilities, 5229 5229 Header->RcrbControl 5230 ); 5230 ); 5231 5231 DumpHex ( 5232 5232 4, … … 5255 5255 5256 5256 ShellPrintHiiEx( 5257 -1, -1, NULL, 5258 STRING_TOKEN (STR_PCI_EXT_CAP_VEN), 5259 gShellDebug1HiiHandle, 5257 -1, -1, NULL, 5258 STRING_TOKEN (STR_PCI_EXT_CAP_VEN), 5259 gShellDebug1HiiHandle, 5260 5260 Header->VendorSpecificHeader 5261 ); 5261 ); 5262 5262 DumpHex ( 5263 5263 4, … … 5286 5286 5287 5287 ShellPrintHiiEx( 5288 -1, -1, NULL, 5289 STRING_TOKEN (STR_PCI_EXT_CAP_ECEA), 5290 gShellDebug1HiiHandle, 5288 -1, -1, NULL, 5289 STRING_TOKEN (STR_PCI_EXT_CAP_ECEA), 5290 gShellDebug1HiiHandle, 5291 5291 Header->AssociationBitmap 5292 ); 5292 ); 5293 5293 DumpHex ( 5294 5294 4, … … 5317 5317 5318 5318 ShellPrintHiiEx( 5319 -1, -1, NULL, 5320 STRING_TOKEN (STR_PCI_EXT_CAP_ARI), 5321 gShellDebug1HiiHandle, 5319 -1, -1, NULL, 5320 STRING_TOKEN (STR_PCI_EXT_CAP_ARI), 5321 gShellDebug1HiiHandle, 5322 5322 Header->AriCapability, 5323 5323 Header->AriControl 5324 ); 5324 ); 5325 5325 DumpHex ( 5326 5326 4, … … 5350 5350 5351 5351 ShellPrintHiiEx( 5352 -1, -1, NULL, 5353 STRING_TOKEN (STR_PCI_EXT_CAP_DPA), 5354 gShellDebug1HiiHandle, 5352 -1, -1, NULL, 5353 STRING_TOKEN (STR_PCI_EXT_CAP_DPA), 5354 gShellDebug1HiiHandle, 5355 5355 Header->DpaCapability, 5356 5356 Header->DpaLatencyIndicator, 5357 5357 Header->DpaStatus, 5358 5358 Header->DpaControl 5359 ); 5359 ); 5360 5360 for (LinkCount = 0 ; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX(Header) + 1 ; LinkCount++) { 5361 5361 ShellPrintHiiEx( 5362 -1, -1, NULL, 5363 STRING_TOKEN (STR_PCI_EXT_CAP_DPA2), 5364 gShellDebug1HiiHandle, 5362 -1, -1, NULL, 5363 STRING_TOKEN (STR_PCI_EXT_CAP_DPA2), 5364 gShellDebug1HiiHandle, 5365 5365 LinkCount+1, 5366 5366 Header->DpaPowerAllocationArray[LinkCount] … … 5394 5394 5395 5395 ShellPrintHiiEx( 5396 -1, -1, NULL, 5397 STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR), 5398 gShellDebug1HiiHandle, 5396 -1, -1, NULL, 5397 STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR), 5398 gShellDebug1HiiHandle, 5399 5399 Header->ElementSelfDescription 5400 5400 ); … … 5402 5402 for (LinkCount = 0 ; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT(Header) ; LinkCount++) { 5403 5403 ShellPrintHiiEx( 5404 -1, -1, NULL, 5405 STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR2), 5406 gShellDebug1HiiHandle, 5404 -1, -1, NULL, 5405 STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR2), 5406 gShellDebug1HiiHandle, 5407 5407 LinkCount+1, 5408 5408 Header->LinkEntry[LinkCount] … … 5435 5435 5436 5436 ShellPrintHiiEx( 5437 -1, -1, NULL, 5438 STRING_TOKEN (STR_PCI_EXT_CAP_AER), 5439 gShellDebug1HiiHandle, 5437 -1, -1, NULL, 5438 STRING_TOKEN (STR_PCI_EXT_CAP_AER), 5439 gShellDebug1HiiHandle, 5440 5440 Header->UncorrectableErrorStatus, 5441 5441 Header->UncorrectableErrorMask, … … 5482 5482 5483 5483 ShellPrintHiiEx( 5484 -1, -1, NULL, 5485 STRING_TOKEN (STR_PCI_EXT_CAP_MULTICAST), 5486 gShellDebug1HiiHandle, 5484 -1, -1, NULL, 5485 STRING_TOKEN (STR_PCI_EXT_CAP_MULTICAST), 5486 gShellDebug1HiiHandle, 5487 5487 Header->MultiCastCapability, 5488 5488 Header->MulticastControl, … … 5523 5523 5524 5524 ShellPrintHiiEx( 5525 -1, -1, NULL, 5526 STRING_TOKEN (STR_PCI_EXT_CAP_VC_BASE), 5527 gShellDebug1HiiHandle, 5525 -1, -1, NULL, 5526 STRING_TOKEN (STR_PCI_EXT_CAP_VC_BASE), 5527 gShellDebug1HiiHandle, 5528 5528 Header->ExtendedVcCount, 5529 5529 Header->PortVcCapability1, … … 5536 5536 CapabilityItem = &Header->Capability[ItemCount]; 5537 5537 ShellPrintHiiEx( 5538 -1, -1, NULL, 5539 STRING_TOKEN (STR_PCI_EXT_CAP_VC_ITEM), 5540 gShellDebug1HiiHandle, 5538 -1, -1, NULL, 5539 STRING_TOKEN (STR_PCI_EXT_CAP_VC_ITEM), 5540 gShellDebug1HiiHandle, 5541 5541 ItemCount+1, 5542 5542 CapabilityItem->VcResourceCapability, … … 5576 5576 for (ItemCount = 0 ; ItemCount < (UINT32)GET_NUMBER_RESIZABLE_BARS(Header) ; ItemCount++) { 5577 5577 ShellPrintHiiEx( 5578 -1, -1, NULL, 5579 STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR), 5580 gShellDebug1HiiHandle, 5578 -1, -1, NULL, 5579 STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR), 5580 gShellDebug1HiiHandle, 5581 5581 ItemCount+1, 5582 5582 Header->Capability[ItemCount].ResizableBarCapability, … … 5612 5612 5613 5613 ShellPrintHiiEx( 5614 -1, -1, NULL, 5615 STRING_TOKEN (STR_PCI_EXT_CAP_TPH), 5616 gShellDebug1HiiHandle, 5614 -1, -1, NULL, 5615 STRING_TOKEN (STR_PCI_EXT_CAP_TPH), 5616 gShellDebug1HiiHandle, 5617 5617 Header->TphRequesterCapability, 5618 5618 Header->TphRequesterControl … … 5654 5654 5655 5655 ShellPrintHiiEx( 5656 -1, -1, NULL, 5657 STRING_TOKEN (STR_PCI_EXT_CAP_SECONDARY), 5658 gShellDebug1HiiHandle, 5656 -1, -1, NULL, 5657 STRING_TOKEN (STR_PCI_EXT_CAP_SECONDARY), 5658 gShellDebug1HiiHandle, 5659 5659 Header->LinkControl3, 5660 5660 Header->LaneErrorStatus … … 5687 5687 EFIAPI 5688 5688 PrintPciExtendedCapabilityDetails( 5689 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress, 5689 IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress, 5690 5690 IN CONST PCI_EXP_EXT_HDR *HeaderAddress, 5691 5691 IN CONST PCIE_CAP_STRUCTURE *PciExpressCapPtr … … 5720 5720 case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_ID: 5721 5721 return PrintInterpretedExtendedCompatibilityVirtualChannel(HeaderAddress, HeadersBaseAddress); 5722 case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID: 5722 case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID: 5723 5723 // 5724 5724 // should only be present if PCIE_CAP_DEVICEPORT_TYPE(PciExpressCapPtr->PcieCapReg) == 0100b, 0101b, or 0110b … … 5748 5748 @param[in] CapabilityPtr The offset from the address to start. 5749 5749 @param[in] EnhancedDump The print format for the dump data. 5750 5750 5751 5751 **/ 5752 5752 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
r58459 r58466 182 182 } 183 183 Attributes = Attributes2; 184 } 184 } 185 185 // 186 186 // ascii text -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c
r58459 r58466 12 12 13 13 **/ 14 14 15 15 16 16 #include "../UefiShellDebug1CommandsLib.h" -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
r58459 r58466 2728 2728 Display System Reset (Type 23) information. 2729 2729 2730 2730 2731 2731 Identifies the system-reset capabilities for the system. 2732 2732 Bits 7:6 Reserved for future assignment via this specification, set to 00b. … … 2832 2832 Display Hardware Security (Type 24) information. 2833 2833 2834 2834 2835 2835 Identifies the password and reset status for the system: 2836 2836 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
r58459 r58466 3228 3228 // or if Key == Value in the table 3229 3229 // 3230 if ((High > Low && Key >= Low && Key <= High) 3230 if ((High > Low && Key >= Low && Key <= High) 3231 3231 || (Table[Index].Key == Key)) { 3232 3232 StrnCpy (Info, Table[Index].Info, InfoLen-1); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView.c
r58459 r58466 92 92 // 93 93 // Init Lib 94 94 95 95 Status = LibSmbiosInit (); 96 96 if (EFI_ERROR (Status)) { -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
r58459 r58466 296 296 } else if (StrLen(StringGuid) != 36) { 297 297 return (EFI_INVALID_PARAMETER); 298 } 298 } 299 299 TempCopy = NULL; 300 300 TempCopy = StrnCatGrow(&TempCopy, NULL, StringGuid, 0); … … 365 365 /** 366 366 Clear the line at the specified Row. 367 367 368 368 @param[in] Row The row number to be cleared ( start from 1 ) 369 369 @param[in] LastCol The last printable column. … … 430 430 /** 431 431 Check if file name has illegal characters. 432 432 433 433 @param Name The filename to check. 434 434 … … 512 512 513 513 /** 514 Read a file into an allocated buffer. The buffer is the responsibility 514 Read a file into an allocated buffer. The buffer is the responsibility 515 515 of the caller to free. 516 516 517 517 @param[in] FileName The filename of the file to open. 518 @param[out] Buffer Upon successful return, the pointer to the 519 address of the allocated buffer. 518 @param[out] Buffer Upon successful return, the pointer to the 519 address of the allocated buffer. 520 520 @param[out] BufferSize If not NULL, then the pointer to the size 521 521 of the allocated buffer. … … 523 523 read only. FALSE otherwise. 524 524 525 @retval EFI_NOT_FOUND The filename did not represent a file in the 525 @retval EFI_NOT_FOUND The filename did not represent a file in the 526 526 file system. 527 527 @retval EFI_SUCCESS The file was read into the buffer. … … 571 571 572 572 Info = ShellGetFileInfo(FileHandle); 573 573 574 574 if (Info->Attribute & EFI_FILE_DIRECTORY) { 575 575 FreePool (Info); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h
r58459 r58466 362 362 /** 363 363 Clear the line at the specified Row. 364 364 365 365 @param[in] Row The row number to be cleared ( start from 1 ) 366 366 @param[in] LastCol The last printable column. … … 377 377 /** 378 378 Check if file name has illegal characters. 379 379 380 380 @param Name The filename to check. 381 381 … … 404 404 405 405 /** 406 Read a file into an allocated buffer. The buffer is the responsibility 406 Read a file into an allocated buffer. The buffer is the responsibility 407 407 of the caller to free. 408 408 409 409 @param[in] FileName The filename of the file to open. 410 @param[out] Buffer Upon successful return, the pointer to the 411 address of the allocated buffer. 410 @param[out] Buffer Upon successful return, the pointer to the 411 address of the allocated buffer. 412 412 @param[out] BufferSize If not NULL, then the pointer to the size 413 413 of the allocated buffer. … … 415 415 read only. FALSE otherwise. 416 416 417 @retval EFI_NOT_FOUND The filename did not represent a file in the 417 @retval EFI_NOT_FOUND The filename did not represent a file in the 418 418 file system. Directories cannot be read with 419 419 this method. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
r58459 r58466 65 65 EditMenuBar.h 66 66 EditMenuBar.c 67 68 ## Files specific to the text editor 67 68 ## Files specific to the text editor 69 69 Edit/Edit.c 70 70 Edit/TextEditor.h … … 77 77 Edit/Misc.c 78 78 Edit/TextEditStrings.uni 79 79 80 80 ## Files specific to the HEX editor 81 81 HexEdit/BufferImage.h -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/Connect.c
r58459 r58466 36 36 EFI_HANDLE Handle; 37 37 EFI_HANDLE PreviousHandle; 38 38 39 39 if (DevicePathToConnect == NULL) { 40 40 return EFI_INVALID_PARAMETER; … … 42 42 43 43 PreviousHandle = NULL; 44 do{ 44 do{ 45 45 RemainingDevicePath = DevicePathToConnect; 46 46 Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &Handle); 47 47 48 48 if (!EFI_ERROR (Status) && (Handle != NULL)) { 49 49 if (PreviousHandle == Handle) { … … 54 54 } 55 55 } 56 56 57 57 } while (!EFI_ERROR (Status) && !IsDevicePathEnd (RemainingDevicePath) ); 58 58 59 59 return Status; 60 60 61 61 } 62 62 63 63 /** 64 64 Connect drivers for PCI root bridge. 65 65 66 66 @retval EFI_SUCCESS Connect drivers successfully. 67 67 @retval EFI_NOT_FOUND Cannot find PCI root bridge device. … … 72 72 VOID 73 73 ) 74 { 74 { 75 75 UINTN RootBridgeHandleCount; 76 76 EFI_HANDLE *RootBridgeHandleBuffer; 77 77 UINTN RootBridgeIndex; 78 78 EFI_STATUS Status; 79 79 80 80 RootBridgeHandleCount = 0; 81 82 Status = gBS->LocateHandleBuffer ( 83 ByProtocol, 84 &gEfiPciRootBridgeIoProtocolGuid, 85 NULL, 86 &RootBridgeHandleCount, 87 &RootBridgeHandleBuffer 81 82 Status = gBS->LocateHandleBuffer ( 83 ByProtocol, 84 &gEfiPciRootBridgeIoProtocolGuid, 85 NULL, 86 &RootBridgeHandleCount, 87 &RootBridgeHandleBuffer 88 88 ); 89 89 if (EFI_ERROR (Status)) { 90 90 return Status; 91 91 } 92 93 for (RootBridgeIndex = 0; RootBridgeIndex < RootBridgeHandleCount; RootBridgeIndex++) { 94 gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE); 95 } 96 92 93 for (RootBridgeIndex = 0; RootBridgeIndex < RootBridgeHandleCount; RootBridgeIndex++) { 94 gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE); 95 } 96 97 97 return EFI_SUCCESS; 98 98 } … … 199 199 EFI_DEVICE_PATH_PROTOCOL *DevPath; 200 200 EFI_DEVICE_PATH_PROTOCOL *CopyOfDevPath; 201 EFI_DEVICE_PATH_PROTOCOL *Instance; 201 EFI_DEVICE_PATH_PROTOCOL *Instance; 202 202 EFI_DEVICE_PATH_PROTOCOL *Next; 203 203 UINTN Length; … … 210 210 EFI_PCI_IO_PROTOCOL *PciIo; 211 211 UINT8 Class[3]; 212 212 213 213 DevPath = NULL; 214 214 Length = 0; … … 266 266 || (DevicePathSubType (Instance) == MSG_USB_WWID_DP) 267 267 )) { 268 268 269 269 Status = ShellConnectPciRootBridge (); 270 270 if (EFI_ERROR(Status)) { … … 273 273 return Status; 274 274 } 275 275 276 276 Status = gBS->LocateHandleBuffer ( 277 277 ByProtocol, … … 281 281 &HandleArray 282 282 ); 283 283 284 284 if (!EFI_ERROR (Status)) { 285 285 for (Index = 0; Index < HandleArrayCount; Index++) { … … 289 289 (VOID **)&PciIo 290 290 ); 291 291 292 292 if (!EFI_ERROR (Status)) { 293 293 Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Class); … … 313 313 FreePool (HandleArray); 314 314 } 315 } else { 315 } else { 316 316 // 317 317 // connect the entire device path … … 323 323 } 324 324 FreePool (Instance); 325 325 326 326 } while (CopyOfDevPath != NULL); 327 327 328 328 if (DevPath != NULL) { 329 329 FreePool(DevPath); … … 335 335 return EFI_NOT_FOUND; 336 336 } 337 337 338 338 } 339 339 … … 521 521 Handle2 = NULL; 522 522 } 523 523 524 524 if (ShellStatus == SHELL_SUCCESS) { 525 525 if (Param1 != NULL && Handle1 == NULL){ -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c
r58459 r58466 59 59 60 60 ASSERT(TheHandle != NULL); 61 61 62 62 if (ShellGetExecutionBreakFlag()) { 63 63 ShellStatus = SHELL_ABORTED; 64 64 return ShellStatus; 65 65 } 66 66 67 67 // 68 68 // We want controller handles. they will not have LoadedImage or DriverBinding (or others...) -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/Devices.c
r58459 r58466 20 20 21 21 @param[in] TheHandle The device handle to get info on. 22 @param[in, out] Type On successful return R, B, or D (root, bus, or 22 @param[in, out] Type On successful return R, B, or D (root, bus, or 23 23 device) will be placed in this buffer. 24 @param[in, out] Cfg On successful return this buffer will be 24 @param[in, out] Cfg On successful return this buffer will be 25 25 TRUE if the handle has configuration, FALSE 26 26 otherwise. 27 @param[in, out] Diag On successful return this buffer will be 27 @param[in, out] Diag On successful return this buffer will be 28 28 TRUE if the handle has disgnostics, FALSE 29 29 otherwise. 30 @param[in, out] Parents On successful return this buffer will be 30 @param[in, out] Parents On successful return this buffer will be 31 31 contain the number of parent handles. 32 @param[in, out] Devices On successful return this buffer will be 32 @param[in, out] Devices On successful return this buffer will be 33 33 contain the number of devices controlled. 34 @param[in, out] Children On successful return this buffer will be 34 @param[in, out] Children On successful return this buffer will be 35 35 contain the number of child handles. 36 36 @param[out] Name The pointer to a buffer that will be allocated … … 60 60 UINTN Count; 61 61 62 if (TheHandle == NULL 62 if (TheHandle == NULL 63 63 || Type == NULL 64 64 || Cfg == NULL … … 255 255 break; 256 256 } 257 257 258 258 } 259 259 … … 261 261 FreePool(HandleList); 262 262 } 263 263 264 264 } 265 265 SHELL_FREE_NON_NULL(Language); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
r58459 r58466 197 197 } 198 198 } 199 199 200 200 SHELL_FREE_NON_NULL(ProtocolGuidArray); 201 201 … … 251 251 /** 252 252 Display driver model information for a given handle. 253 253 254 254 @param[in] Handle The handle to display info on. 255 255 @param[in] BestName Use the best name? … … 340 340 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer!=NULL?TempStringPointer:L"<Unknown>"); 341 341 SHELL_FREE_NON_NULL(TempStringPointer); 342 342 343 343 TempStringPointer = ConvertDevicePathToText(DevicePath, TRUE, FALSE); 344 344 ShellPrintHiiEx( 345 -1, 346 -1, 347 NULL, 348 STRING_TOKEN (STR_DH_OUTPUT_DRIVER2), 349 gShellDriver1HiiHandle, 345 -1, 346 -1, 347 NULL, 348 STRING_TOKEN (STR_DH_OUTPUT_DRIVER2), 349 gShellDriver1HiiHandle, 350 350 TempStringPointer!=NULL?TempStringPointer:L"<None>", 351 351 ParentControllerHandleCount == 0?L"ROOT":(ChildControllerHandleCount > 0)?L"BUS":L"DEVICE", … … 358 358 if (DriverBindingHandleCount == 0) { 359 359 ShellPrintHiiEx( 360 -1, 361 -1, 362 NULL, 363 STRING_TOKEN (STR_DH_OUTPUT_DRIVER3), 364 gShellDriver1HiiHandle, 360 -1, 361 -1, 362 NULL, 363 STRING_TOKEN (STR_DH_OUTPUT_DRIVER3), 364 gShellDriver1HiiHandle, 365 365 L"<None>" 366 366 ); 367 367 } else { 368 368 ShellPrintHiiEx( 369 -1, 370 -1, 371 NULL, 372 STRING_TOKEN (STR_DH_OUTPUT_DRIVER3), 373 gShellDriver1HiiHandle, 369 -1, 370 -1, 371 NULL, 372 STRING_TOKEN (STR_DH_OUTPUT_DRIVER3), 373 gShellDriver1HiiHandle, 374 374 L"" 375 375 ); … … 393 393 if (Image) { 394 394 ShellPrintHiiEx( 395 -1, 396 -1, 397 NULL, 395 -1, 396 -1, 397 NULL, 398 398 STRING_TOKEN (STR_DH_OUTPUT_DRIVER4A), 399 399 gShellDriver1HiiHandle, … … 403 403 } else { 404 404 ShellPrintHiiEx( 405 -1, 406 -1, 407 NULL, 405 -1, 406 -1, 407 NULL, 408 408 STRING_TOKEN (STR_DH_OUTPUT_DRIVER4B), 409 409 gShellDriver1HiiHandle, … … 418 418 if (ParentControllerHandleCount == 0) { 419 419 ShellPrintHiiEx( 420 -1, 421 -1, 422 NULL, 423 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5), 424 gShellDriver1HiiHandle, 420 -1, 421 -1, 422 NULL, 423 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5), 424 gShellDriver1HiiHandle, 425 425 L"<None>" 426 426 ); 427 427 } else { 428 428 ShellPrintHiiEx( 429 -1, 430 -1, 431 NULL, 432 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5), 433 gShellDriver1HiiHandle, 429 -1, 430 -1, 431 NULL, 432 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5), 433 gShellDriver1HiiHandle, 434 434 L"" 435 435 ); … … 437 437 Status = gEfiShellProtocol->GetDeviceName(ParentControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer); 438 438 ShellPrintHiiEx( 439 -1, 440 -1, 441 NULL, 439 -1, 440 -1, 441 NULL, 442 442 STRING_TOKEN (STR_DH_OUTPUT_DRIVER5B), 443 443 gShellDriver1HiiHandle, … … 451 451 if (ChildControllerHandleCount == 0) { 452 452 ShellPrintHiiEx( 453 -1, 454 -1, 455 NULL, 456 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 457 gShellDriver1HiiHandle, 453 -1, 454 -1, 455 NULL, 456 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 457 gShellDriver1HiiHandle, 458 458 L"<None>" 459 459 ); 460 460 } else { 461 461 ShellPrintHiiEx( 462 -1, 463 -1, 464 NULL, 465 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 466 gShellDriver1HiiHandle, 462 -1, 463 -1, 464 NULL, 465 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 466 gShellDriver1HiiHandle, 467 467 L"" 468 468 ); … … 470 470 Status = gEfiShellProtocol->GetDeviceName(ChildControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer); 471 471 ShellPrintHiiEx( 472 -1, 473 -1, 474 NULL, 472 -1, 473 -1, 474 NULL, 475 475 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B), 476 476 gShellDriver1HiiHandle, … … 532 532 533 533 ShellPrintHiiEx( 534 -1, 535 -1, 536 NULL, 534 -1, 535 -1, 536 NULL, 537 537 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B), 538 538 gShellDriver1HiiHandle, … … 549 549 } 550 550 ShellPrintHiiEx( 551 -1, 552 -1, 553 NULL, 551 -1, 552 -1, 553 NULL, 554 554 STRING_TOKEN (STR_DH_OUTPUT_DRIVER7B), 555 555 gShellDriver1HiiHandle, … … 559 559 560 560 ShellPrintHiiEx( 561 -1, 562 -1, 563 NULL, 564 STRING_TOKEN (STR_DH_OUTPUT_DRIVER8), 565 gShellDriver1HiiHandle, 561 -1, 562 -1, 563 NULL, 564 STRING_TOKEN (STR_DH_OUTPUT_DRIVER8), 565 gShellDriver1HiiHandle, 566 566 DriverBinding->Version, 567 567 NumberOfChildren > 0?L"Bus":ControllerHandleCount > 0?L"Device":L"<Unknown>", … … 572 572 if (ControllerHandleCount == 0) { 573 573 ShellPrintHiiEx( 574 -1, 575 -1, 576 NULL, 577 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 578 gShellDriver1HiiHandle, 574 -1, 575 -1, 576 NULL, 577 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 578 gShellDriver1HiiHandle, 579 579 L"None" 580 580 ); 581 581 } else { 582 582 ShellPrintHiiEx( 583 -1, 584 -1, 585 NULL, 586 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 587 gShellDriver1HiiHandle, 583 -1, 584 -1, 585 NULL, 586 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6), 587 gShellDriver1HiiHandle, 588 588 L"" 589 589 ); … … 592 592 593 593 ShellPrintHiiEx( 594 -1, 595 -1, 596 NULL, 594 -1, 595 -1, 596 NULL, 597 597 STRING_TOKEN (STR_DH_OUTPUT_DRIVER9B), 598 598 gShellDriver1HiiHandle, … … 613 613 614 614 ShellPrintHiiEx( 615 -1, 616 -1, 617 NULL, 615 -1, 616 -1, 617 NULL, 618 618 STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B), 619 619 gShellDriver1HiiHandle, -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
r58459 r58466 30 30 31 31 @retval NULL An error occured. 32 @return A pointer to the driver path as a string. The callee must 32 @return A pointer to the driver path as a string. The callee must 33 33 free this memory. 34 34 **/ … … 306 306 FreePool(Temp2); 307 307 } 308 308 309 309 if (ShellGetExecutionBreakFlag ()) { 310 310 ShellStatus = SHELL_ABORTED; -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvCfg.c
r58459 r58466 176 176 -1, 177 177 NULL, 178 STRING_TOKEN(STR_GEN_FILE_OPEN), 179 gShellDriver1HiiHandle, 180 FileName, 178 STRING_TOKEN(STR_GEN_FILE_OPEN), 179 gShellDriver1HiiHandle, 180 FileName, 181 181 Status); 182 182 return (SHELL_DEVICE_ERROR); … … 194 194 if (EFI_ERROR(Status) || HiiDatabase == NULL) { 195 195 ShellPrintHiiEx( 196 -1, 197 -1, 196 -1, 197 -1, 198 198 NULL, 199 STRING_TOKEN(STR_GEN_PROTOCOL_NF), 200 gShellDriver1HiiHandle, 201 L"EfiHiiDatabaseProtocol", 199 STRING_TOKEN(STR_GEN_PROTOCOL_NF), 200 gShellDriver1HiiHandle, 201 L"EfiHiiDatabaseProtocol", 202 202 &gEfiHiiDatabaseProtocolGuid); 203 203 ShellCloseFile(&FileHandle); … … 208 208 if (EFI_ERROR(Status)) { 209 209 ShellPrintHiiEx( 210 -1, 211 -1, 212 NULL, 213 STRING_TOKEN(STR_GEN_HANDLE_NOT), 214 gShellDriver1HiiHandle, 215 ConvertHandleToHandleIndex(Handle), 210 -1, 211 -1, 212 NULL, 213 STRING_TOKEN(STR_GEN_HANDLE_NOT), 214 gShellDriver1HiiHandle, 215 ConvertHandleToHandleIndex(Handle), 216 216 L"Device"); 217 217 ShellCloseFile(&FileHandle); 218 return (SHELL_DEVICE_ERROR); 218 return (SHELL_DEVICE_ERROR); 219 219 } 220 220 … … 232 232 if (EFI_ERROR(Status)) { 233 233 ShellPrintHiiEx( 234 -1, 234 -1, 235 235 -1, 236 236 NULL, 237 STRING_TOKEN(STR_FILE_WRITE_FAIL), 238 gShellDriver1HiiHandle, 239 FileName, 237 STRING_TOKEN(STR_FILE_WRITE_FAIL), 238 gShellDriver1HiiHandle, 239 FileName, 240 240 Status); 241 return (SHELL_DEVICE_ERROR); 241 return (SHELL_DEVICE_ERROR); 242 242 } 243 243 ShellPrintHiiEx( 244 -1, 244 -1, 245 245 -1, 246 246 NULL, 247 STRING_TOKEN(STR_DRVCFG_COMP), 247 STRING_TOKEN(STR_DRVCFG_COMP), 248 248 gShellDriver1HiiHandle); 249 249 … … 288 288 -1, 289 289 NULL, 290 STRING_TOKEN(STR_GEN_FILE_OPEN), 291 gShellDriver1HiiHandle, 292 FileName, 290 STRING_TOKEN(STR_GEN_FILE_OPEN), 291 gShellDriver1HiiHandle, 292 FileName, 293 293 Status); 294 294 return (SHELL_DEVICE_ERROR); … … 306 306 if (EFI_ERROR(Status) || HiiDatabase == NULL) { 307 307 ShellPrintHiiEx( 308 -1, 309 -1, 308 -1, 309 -1, 310 310 NULL, 311 STRING_TOKEN(STR_GEN_PROTOCOL_NF), 312 gShellDriver1HiiHandle, 313 L"EfiHiiDatabaseProtocol", 311 STRING_TOKEN(STR_GEN_PROTOCOL_NF), 312 gShellDriver1HiiHandle, 313 L"EfiHiiDatabaseProtocol", 314 314 &gEfiHiiDatabaseProtocolGuid); 315 315 ShellCloseFile(&FileHandle); … … 321 321 if (EFI_ERROR(Status)) { 322 322 ShellPrintHiiEx( 323 -1, 324 -1, 325 NULL, 326 STRING_TOKEN(STR_FILE_READ_FAIL), 327 gShellDriver1HiiHandle, 323 -1, 324 -1, 325 NULL, 326 STRING_TOKEN(STR_FILE_READ_FAIL), 327 gShellDriver1HiiHandle, 328 328 FileName, 329 329 Status); 330 330 ShellCloseFile(&FileHandle); 331 return (SHELL_DEVICE_ERROR); 332 } 333 MainBuffer = AllocateZeroPool((UINTN)MainBufferSize); 331 return (SHELL_DEVICE_ERROR); 332 } 333 MainBuffer = AllocateZeroPool((UINTN)MainBufferSize); 334 334 if (EFI_ERROR(Status)) { 335 335 ShellPrintHiiEx( 336 -1, 337 -1, 338 NULL, 339 STRING_TOKEN(STR_GEN_OUT_MEM), 336 -1, 337 -1, 338 NULL, 339 STRING_TOKEN(STR_GEN_OUT_MEM), 340 340 gShellDriver1HiiHandle); 341 341 ShellCloseFile(&FileHandle); 342 return (SHELL_DEVICE_ERROR); 342 return (SHELL_DEVICE_ERROR); 343 343 } 344 344 Status = ShellReadFile(FileHandle, &MainBufferSize, MainBuffer); 345 345 if (EFI_ERROR(Status)) { 346 346 ShellPrintHiiEx( 347 -1, 348 -1, 349 NULL, 350 STRING_TOKEN(STR_FILE_READ_FAIL), 351 gShellDriver1HiiHandle, 347 -1, 348 -1, 349 NULL, 350 STRING_TOKEN(STR_FILE_READ_FAIL), 351 gShellDriver1HiiHandle, 352 352 FileName, 353 353 Status); 354 354 ShellCloseFile(&FileHandle); 355 355 SHELL_FREE_NON_NULL(MainBuffer); 356 return (SHELL_DEVICE_ERROR); 356 return (SHELL_DEVICE_ERROR); 357 357 } 358 358 … … 367 367 if (EFI_ERROR(Status)) { 368 368 ShellPrintHiiEx( 369 -1, 370 -1, 371 NULL, 372 STRING_TOKEN(STR_GEN_HANDLE_NOT), 373 gShellDriver1HiiHandle, 374 ConvertHandleToHandleIndex(Handle), 369 -1, 370 -1, 371 NULL, 372 STRING_TOKEN(STR_GEN_HANDLE_NOT), 373 gShellDriver1HiiHandle, 374 ConvertHandleToHandleIndex(Handle), 375 375 L"Device"); 376 376 ShellCloseFile(&FileHandle); 377 return (SHELL_DEVICE_ERROR); 377 return (SHELL_DEVICE_ERROR); 378 378 } 379 379 Status = HiiDatabase->UpdatePackageList(HiiDatabase, HiiHandle, MainBuffer); 380 380 if (EFI_ERROR(Status)) { 381 381 ShellPrintHiiEx( 382 -1, 383 -1, 384 NULL, 385 STRING_TOKEN(STR_GEN_UEFI_FUNC_ERROR), 386 gShellDriver1HiiHandle, 387 L"HiiDatabase->UpdatePackageList", 382 -1, 383 -1, 384 NULL, 385 STRING_TOKEN(STR_GEN_UEFI_FUNC_ERROR), 386 gShellDriver1HiiHandle, 387 L"HiiDatabase->UpdatePackageList", 388 388 Status); 389 return (SHELL_DEVICE_ERROR); 389 return (SHELL_DEVICE_ERROR); 390 390 } 391 391 } else { … … 409 409 TempDevPathString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE); 410 410 ShellPrintHiiEx( 411 -1, 412 -1, 413 NULL, 414 STRING_TOKEN(STR_DRVCFG_IN_FILE_NF), 415 gShellDriver1HiiHandle, 411 -1, 412 -1, 413 NULL, 414 STRING_TOKEN(STR_DRVCFG_IN_FILE_NF), 415 gShellDriver1HiiHandle, 416 416 TempDevPathString); 417 417 SHELL_FREE_NON_NULL(TempDevPathString); … … 420 420 if (EFI_ERROR(Status)) { 421 421 ShellPrintHiiEx( 422 -1, 423 -1, 424 NULL, 425 STRING_TOKEN(STR_GEN_UEFI_FUNC_ERROR), 426 gShellDriver1HiiHandle, 427 L"HiiDatabase->UpdatePackageList", 422 -1, 423 -1, 424 NULL, 425 STRING_TOKEN(STR_GEN_UEFI_FUNC_ERROR), 426 gShellDriver1HiiHandle, 427 L"HiiDatabase->UpdatePackageList", 428 428 Status); 429 429 return (SHELL_DEVICE_ERROR); … … 433 433 HandleIndex = ConvertHandleToHandleIndex(Handle); 434 434 ShellPrintHiiEx( 435 -1, 436 -1, 437 NULL, 438 STRING_TOKEN(STR_DRVCFG_DONE_HII), 439 gShellDriver1HiiHandle, 435 -1, 436 -1, 437 NULL, 438 STRING_TOKEN(STR_DRVCFG_DONE_HII), 439 gShellDriver1HiiHandle, 440 440 HandleIndex); 441 441 } 442 } 442 } 443 443 } 444 444 } … … 450 450 451 451 ShellPrintHiiEx( 452 -1, 452 -1, 453 453 -1, 454 454 NULL, 455 STRING_TOKEN(STR_DRVCFG_COMP), 455 STRING_TOKEN(STR_DRVCFG_COMP), 456 456 gShellDriver1HiiHandle); 457 457 return (SHELL_SUCCESS); … … 582 582 -1, 583 583 NULL, 584 STRING_TOKEN (STR_DRVCFG_FORCE_D), 585 gShellDriver1HiiHandle, 584 STRING_TOKEN (STR_DRVCFG_FORCE_D), 585 gShellDriver1HiiHandle, 586 586 DefaultType); 587 587 } else if (ValidateOptions) { … … 590 590 -1, 591 591 NULL, 592 STRING_TOKEN (STR_DRVCFG_VALIDATE), 592 STRING_TOKEN (STR_DRVCFG_VALIDATE), 593 593 gShellDriver1HiiHandle); 594 594 } else if (SetOptions) { … … 597 597 -1, 598 598 NULL, 599 STRING_TOKEN (STR_DRVCFG_SET), 599 STRING_TOKEN (STR_DRVCFG_SET), 600 600 gShellDriver1HiiHandle); 601 601 } … … 608 608 } 609 609 for ( 610 HandleBuffer = DriverImageHandleBuffer, DriverImageHandleCount = 0 611 ; HandleBuffer != NULL && *HandleBuffer != NULL 610 HandleBuffer = DriverImageHandleBuffer, DriverImageHandleCount = 0 611 ; HandleBuffer != NULL && *HandleBuffer != NULL 612 612 ; HandleBuffer++,DriverImageHandleCount++); 613 613 } else { … … 655 655 continue; 656 656 } 657 657 658 658 BestLanguage = GetBestLanguage ( 659 659 DriverConfiguration->SupportedLanguages, … … 713 713 -1, 714 714 NULL, 715 STRING_TOKEN (STR_DRVCFG_OPTIONS_SET), 715 STRING_TOKEN (STR_DRVCFG_OPTIONS_SET), 716 716 gShellDriver1HiiHandle); 717 717 for (LoopCounter = 0; LoopCounter < HandleCount; LoopCounter++) { … … 730 730 -1, 731 731 NULL, 732 STRING_TOKEN (STR_DRVCFG_NOT_SET), 733 gShellDriver1HiiHandle, 732 STRING_TOKEN (STR_DRVCFG_NOT_SET), 733 gShellDriver1HiiHandle, 734 734 Status); 735 735 } … … 772 772 -1, 773 773 NULL, 774 STRING_TOKEN (STR_DRVCFG_DEF_FORCED), 774 STRING_TOKEN (STR_DRVCFG_DEF_FORCED), 775 775 gShellDriver1HiiHandle); 776 776 ShellCmdDriverConfigurationProcessActionRequired ( … … 785 785 -1, 786 786 NULL, 787 STRING_TOKEN (STR_DRVCFG_FORCE_FAILED), 788 gShellDriver1HiiHandle, 787 STRING_TOKEN (STR_DRVCFG_FORCE_FAILED), 788 gShellDriver1HiiHandle, 789 789 Status); 790 790 ShellStatus = SHELL_DEVICE_ERROR; … … 802 802 -1, 803 803 NULL, 804 STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID), 804 STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID), 805 805 gShellDriver1HiiHandle); 806 806 } else { … … 809 809 -1, 810 810 NULL, 811 STRING_TOKEN (STR_DRVCFG_OPTIONS_INV), 812 gShellDriver1HiiHandle, 811 STRING_TOKEN (STR_DRVCFG_OPTIONS_INV), 812 gShellDriver1HiiHandle, 813 813 Status); 814 814 ShellStatus = SHELL_DEVICE_ERROR; … … 841 841 -1, 842 842 NULL, 843 STRING_TOKEN (STR_DRVCFG_OPTIONS_SET), 843 STRING_TOKEN (STR_DRVCFG_OPTIONS_SET), 844 844 gShellDriver1HiiHandle); 845 845 … … 856 856 -1, 857 857 NULL, 858 STRING_TOKEN (STR_DRVCFG_NOT_SET), 859 gShellDriver1HiiHandle, 858 STRING_TOKEN (STR_DRVCFG_NOT_SET), 859 gShellDriver1HiiHandle, 860 860 Status); 861 861 ShellStatus = SHELL_DEVICE_ERROR; … … 919 919 -1, 920 920 NULL, 921 STRING_TOKEN (STR_DRVCFG_DEF_FORCED), 921 STRING_TOKEN (STR_DRVCFG_DEF_FORCED), 922 922 gShellDriver1HiiHandle); 923 923 … … 934 934 -1, 935 935 NULL, 936 STRING_TOKEN (STR_DRVCFG_FORCE_FAILED), 937 gShellDriver1HiiHandle, 936 STRING_TOKEN (STR_DRVCFG_FORCE_FAILED), 937 gShellDriver1HiiHandle, 938 938 Status); 939 939 ShellStatus = SHELL_DEVICE_ERROR; … … 951 951 -1, 952 952 NULL, 953 STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID), 953 STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID), 954 954 gShellDriver1HiiHandle); 955 955 } else { … … 958 958 -1, 959 959 NULL, 960 STRING_TOKEN (STR_DRVCFG_OPTIONS_INV), 961 gShellDriver1HiiHandle, 960 STRING_TOKEN (STR_DRVCFG_OPTIONS_INV), 961 gShellDriver1HiiHandle, 962 962 Status); 963 963 ShellStatus = SHELL_DEVICE_ERROR; … … 992 992 -1, 993 993 NULL, 994 STRING_TOKEN (STR_DRVCFG_OPTIONS_SET), 994 STRING_TOKEN (STR_DRVCFG_OPTIONS_SET), 995 995 gShellDriver1HiiHandle); 996 996 … … 1007 1007 -1, 1008 1008 NULL, 1009 STRING_TOKEN (STR_DRVCFG_NOT_SET), 1010 gShellDriver1HiiHandle, 1009 STRING_TOKEN (STR_DRVCFG_NOT_SET), 1010 gShellDriver1HiiHandle, 1011 1011 Status); 1012 1012 ShellStatus = SHELL_DEVICE_ERROR; … … 1070 1070 Index2 = *CurrentHandle == NULL ? 0 : ConvertHandleToHandleIndex(*CurrentHandle); 1071 1071 ShellPrintHiiEx( 1072 -1, 1073 -1, 1074 NULL, 1075 STRING_TOKEN (STR_DRVCFG_LINE_HII), 1076 gShellDriver1HiiHandle, 1072 -1, 1073 -1, 1074 NULL, 1075 STRING_TOKEN (STR_DRVCFG_LINE_HII), 1076 gShellDriver1HiiHandle, 1077 1077 Index2 1078 1078 ); … … 1191 1191 } 1192 1192 } 1193 } 1193 } 1194 1194 if (ShellStatus == SHELL_SUCCESS) { 1195 1195 Lang = ShellCommandLineGetValue(Package, L"-l"); … … 1221 1221 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellDriver1HiiHandle, FileName); 1222 1222 ShellStatus = SHELL_INVALID_PARAMETER; 1223 goto Done; 1223 goto Done; 1224 1224 } 1225 1225 if (OutToFile && !EFI_ERROR(ShellFileExists(FileName))) { 1226 1226 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_EXIST), gShellDriver1HiiHandle, FileName); 1227 1227 ShellStatus = SHELL_INVALID_PARAMETER; 1228 goto Done; 1228 goto Done; 1229 1229 } 1230 1230 if (Force && ForceTypeString == NULL) { … … 1232 1232 ShellStatus = SHELL_INVALID_PARAMETER; 1233 1233 goto Done; 1234 } 1234 } 1235 1235 if (Force) { 1236 1236 Status = ShellConvertStringToUint64(ForceTypeString, &Intermediate, FALSE, FALSE); … … 1289 1289 ShellStatus = SHELL_INVALID_PARAMETER; 1290 1290 goto Done; 1291 } 1291 } 1292 1292 if (OutToFile) { 1293 1293 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"-o"); … … 1300 1300 ShellStatus = SHELL_INVALID_PARAMETER; 1301 1301 goto Done; 1302 } 1302 } 1303 1303 if (Validate && Set) { 1304 1304 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONF), gShellDriver1HiiHandle, L"-v", L"-s"); 1305 1305 ShellStatus = SHELL_INVALID_PARAMETER; 1306 1306 goto Done; 1307 } 1307 } 1308 1308 if (Set && Force) { 1309 1309 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONF), gShellDriver1HiiHandle, L"-s", L"-f"); … … 1348 1348 if (!EFI_ERROR(gBS->OpenProtocol(Handle1, &gEfiHiiConfigAccessProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) { 1349 1349 ShellPrintHiiEx( 1350 -1, 1351 -1, 1352 NULL, 1353 STRING_TOKEN (STR_DRVCFG_LINE_HII), 1354 gShellDriver1HiiHandle, 1350 -1, 1351 -1, 1352 NULL, 1353 STRING_TOKEN (STR_DRVCFG_LINE_HII), 1354 gShellDriver1HiiHandle, 1355 1355 ConvertHandleToHandleIndex(Handle1) 1356 1356 ); … … 1382 1382 NULL, 1383 1383 STRING_TOKEN (STR_DRVCFG_NOT_SUPPORT), 1384 gShellDriver1HiiHandle, 1384 gShellDriver1HiiHandle, 1385 1385 ConvertHandleToHandleIndex(Handle1) 1386 1386 ); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/DrvDiag.c
r58459 r58466 103 103 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"gEfiDriverDiagnostics2ProtocolGuid", &gEfiDriverDiagnostics2ProtocolGuid); 104 104 return (EFI_NOT_FOUND); 105 } 105 } 106 106 for (Walker = DriverHandleList ; Walker != NULL && *Walker != NULL ; DriverHandleListCount++, Walker++); 107 107 } … … 142 142 if (ControllerHandle == NULL) { 143 143 PARSE_HANDLE_DATABASE_DEVICES(DriverHandleList[DriverHandleListLoop], &ControllerHandleListCount, &ControllerHandleList); 144 } 144 } 145 145 if (ControllerHandleListCount == 0) { 146 146 if (Mode == TestModeList) { … … 158 158 ASSERT(ChildHandleList == NULL); 159 159 PARSE_HANDLE_DATABASE_MANAGED_CHILDREN( 160 DriverHandleList[DriverHandleListLoop], 160 DriverHandleList[DriverHandleListLoop], 161 161 ControllerHandleList[ControllerHandleListLoop], 162 162 &ChildHandleListCount, … … 194 194 FreePool(Language); 195 195 } 196 } 196 } 197 197 if (!Found && (Lang == NULL||(Lang!=NULL&&(Lang[2]!='-')))){ 198 198 Status = gBS->OpenProtocol( … … 430 430 Language, 431 431 ShellCommandLineGetFlag(Package, L"-c"), 432 Handle1, 433 Handle2, 432 Handle1, 433 Handle2, 434 434 Handle3 435 435 ); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/OpenInfo.c
r58459 r58466 127 127 OpenTypeString, 128 128 Name 129 ); 129 ); 130 130 } 131 131 } -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
r58459 r58466 32 32 33 33 TheString = GetProtocolInformationDump(TheHandle, &gEfiLoadedImageProtocolGuid, TRUE); 34 34 35 35 ShellPrintEx(-1, -1, L"%s", TheString); 36 36 37 37 SHELL_FREE_NON_NULL(TheString); 38 38 39 39 return (EFI_SUCCESS); 40 40 } … … 118 118 DumpLoadedImageProtocolInfo(TheHandle); 119 119 } 120 120 121 121 if (!ShellCommandLineGetFlag(Package, L"-n")) { 122 122 Status = ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_UNLOAD_CONF), gShellDriver1HiiHandle, (UINTN)TheHandle); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
r58459 r58466 49 49 50 50 [Guids] 51 gShellInstall1HiiGuid ## UNDEFINED 51 gShellInstall1HiiGuid ## UNDEFINED -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
r58459 r58466 90 90 CurrentScriptFile = ShellCommandGetCurrentScriptFile(); 91 91 ShellPrintHiiEx( 92 -1, 93 -1, 94 NULL, 95 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 96 gShellLevel1HiiHandle, 97 L"For", 98 L"EndFor", 92 -1, 93 -1, 94 NULL, 95 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 96 gShellLevel1HiiHandle, 97 L"For", 98 L"EndFor", 99 99 CurrentScriptFile!=NULL 100 100 && CurrentScriptFile->CurrentCommand!=NULL … … 344 344 if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) { 345 345 ShellPrintHiiEx( 346 -1, 347 -1, 348 NULL, 349 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 350 gShellLevel1HiiHandle, 351 L"EndFor", 352 L"For", 346 -1, 347 -1, 348 NULL, 349 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 350 gShellLevel1HiiHandle, 351 L"EndFor", 352 L"For", 353 353 CurrentScriptFile->CurrentCommand->Line); 354 354 return (SHELL_DEVICE_ERROR); … … 461 461 if (ArgSetWalker[0] != L'(') { 462 462 ShellPrintHiiEx( 463 -1, 464 -1, 465 NULL, 466 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 467 gShellLevel1HiiHandle, 468 ArgSet, 463 -1, 464 -1, 465 NULL, 466 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 467 gShellLevel1HiiHandle, 468 ArgSet, 469 469 CurrentScriptFile->CurrentCommand->Line); 470 470 ShellStatus = SHELL_INVALID_PARAMETER; … … 484 484 if (TempSpot == NULL) { 485 485 ShellPrintHiiEx( 486 -1, 487 -1, 488 NULL, 489 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 490 gShellLevel1HiiHandle, 486 -1, 487 -1, 488 NULL, 489 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 490 gShellLevel1HiiHandle, 491 491 CurrentScriptFile->CurrentCommand->Line); 492 492 ShellStatus = SHELL_INVALID_PARAMETER; … … 499 499 if (!ShellIsValidForNumber(ArgSetWalker)) { 500 500 ShellPrintHiiEx( 501 -1, 502 -1, 503 NULL, 504 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 505 gShellLevel1HiiHandle, 506 ArgSet, 501 -1, 502 -1, 503 NULL, 504 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 505 gShellLevel1HiiHandle, 506 ArgSet, 507 507 CurrentScriptFile->CurrentCommand->Line); 508 508 ShellStatus = SHELL_INVALID_PARAMETER; … … 519 519 if (ArgSetWalker == NULL || *ArgSetWalker == CHAR_NULL || !ShellIsValidForNumber(ArgSetWalker)){ 520 520 ShellPrintHiiEx( 521 -1, 522 -1, 523 NULL, 524 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 525 gShellLevel1HiiHandle, 526 ArgSet, 521 -1, 522 -1, 523 NULL, 524 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 525 gShellLevel1HiiHandle, 526 ArgSet, 527 527 CurrentScriptFile->CurrentCommand->Line); 528 528 ShellStatus = SHELL_INVALID_PARAMETER; … … 546 546 if (ArgSetWalker == NULL || *ArgSetWalker == CHAR_NULL || !ShellIsValidForNumber(ArgSetWalker)){ 547 547 ShellPrintHiiEx( 548 -1, 549 -1, 550 NULL, 551 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 552 gShellLevel1HiiHandle, 553 ArgSet, 548 -1, 549 -1, 550 NULL, 551 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 552 gShellLevel1HiiHandle, 553 ArgSet, 554 554 CurrentScriptFile->CurrentCommand->Line); 555 555 ShellStatus = SHELL_INVALID_PARAMETER; … … 566 566 if (StrStr(ArgSetWalker, L" ") != NULL) { 567 567 ShellPrintHiiEx( 568 -1, 569 -1, 570 NULL, 571 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 572 gShellLevel1HiiHandle, 573 ArgSet, 568 -1, 569 -1, 570 NULL, 571 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 572 gShellLevel1HiiHandle, 573 ArgSet, 574 574 CurrentScriptFile->CurrentCommand->Line); 575 575 ShellStatus = SHELL_INVALID_PARAMETER; … … 577 577 } 578 578 } 579 579 580 580 } 581 581 } … … 596 596 } else { 597 597 ShellPrintHiiEx( 598 -1, 599 -1, 600 NULL, 601 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 602 gShellLevel1HiiHandle, 603 ArgSet, 604 CurrentScriptFile!=NULL 598 -1, 599 -1, 600 NULL, 601 STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT), 602 gShellLevel1HiiHandle, 603 ArgSet, 604 CurrentScriptFile!=NULL 605 605 && CurrentScriptFile->CurrentCommand!=NULL 606 606 ? CurrentScriptFile->CurrentCommand->Line:0); … … 651 651 if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, FALSE, FALSE)) { 652 652 ShellPrintHiiEx( 653 -1, 654 -1, 655 NULL, 656 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 657 gShellLevel1HiiHandle, 658 L"EndFor", 659 L"For", 660 CurrentScriptFile!=NULL 653 -1, 654 -1, 655 NULL, 656 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 657 gShellLevel1HiiHandle, 658 L"EndFor", 659 L"For", 660 CurrentScriptFile!=NULL 661 661 && CurrentScriptFile->CurrentCommand!=NULL 662 662 ? CurrentScriptFile->CurrentCommand->Line:0); … … 713 713 if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, FALSE, FALSE)) { 714 714 ShellPrintHiiEx( 715 -1, 716 -1, 717 NULL, 718 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 719 gShellLevel1HiiHandle, 720 L"EndFor", 721 L"For", 722 CurrentScriptFile!=NULL 715 -1, 716 -1, 717 NULL, 718 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 719 gShellLevel1HiiHandle, 720 L"EndFor", 721 L"For", 722 CurrentScriptFile!=NULL 723 723 && CurrentScriptFile->CurrentCommand!=NULL 724 724 ? CurrentScriptFile->CurrentCommand->Line:0); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel1CommandsLib/Goto.c
r48674 r58466 83 83 CurrentScriptFile = ShellCommandGetCurrentScriptFile(); 84 84 ShellPrintHiiEx( 85 -1, 86 -1, 87 NULL, 88 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 89 gShellLevel1HiiHandle, 90 CompareString, 91 L"Goto", 92 CurrentScriptFile!=NULL 85 -1, 86 -1, 87 NULL, 88 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 89 gShellLevel1HiiHandle, 90 CompareString, 91 L"Goto", 92 CurrentScriptFile!=NULL 93 93 && CurrentScriptFile->CurrentCommand!=NULL 94 94 ? CurrentScriptFile->CurrentCommand->Line:0); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
r58459 r58466 334 334 Process an if statement and determine if its is valid or not. 335 335 336 @param[in, out] PassingState Opon entry, the current state. Upon exit, 336 @param[in, out] PassingState Opon entry, the current state. Upon exit, 337 337 the new state. 338 338 @param[in] StartParameterNumber The number of the first parameter of … … 345 345 346 346 @retval EFI_INVALID_PARAMETER A parameter was invalid. 347 @retval EFI_SUCCESS The operation was successful. 347 @retval EFI_SUCCESS The operation was successful. 348 348 **/ 349 349 EFI_STATUS … … 642 642 643 643 @param[in] ParameterNumber The current parameter number. 644 @param[out] EndParameter Upon successful return, will point to the 644 @param[out] EndParameter Upon successful return, will point to the 645 645 parameter to start the next iteration with. 646 @param[out] EndTag Upon successful return, will point to the 646 @param[out] EndTag Upon successful return, will point to the 647 647 type that was found at the end of this statement. 648 648 … … 848 848 if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) { 849 849 ShellPrintHiiEx( 850 -1, 851 -1, 852 NULL, 853 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 854 gShellLevel1HiiHandle, 855 L"EndIf", 856 L"If", 857 CurrentScriptFile!=NULL 850 -1, 851 -1, 852 NULL, 853 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 854 gShellLevel1HiiHandle, 855 L"EndIf", 856 L"If", 857 CurrentScriptFile!=NULL 858 858 && CurrentScriptFile->CurrentCommand!=NULL 859 859 ? CurrentScriptFile->CurrentCommand->Line:0); … … 933 933 CurrentScriptFile = ShellCommandGetCurrentScriptFile(); 934 934 ShellPrintHiiEx( 935 -1, 936 -1, 937 NULL, 938 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 939 gShellLevel1HiiHandle, 940 L"Then", 935 -1, 936 -1, 937 NULL, 938 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 939 gShellLevel1HiiHandle, 940 L"Then", 941 941 L"If", 942 CurrentScriptFile!=NULL 942 CurrentScriptFile!=NULL 943 943 && CurrentScriptFile->CurrentCommand!=NULL 944 944 ? CurrentScriptFile->CurrentCommand->Line:0); … … 1010 1010 if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) { 1011 1011 ShellPrintHiiEx( 1012 -1, 1013 -1, 1014 NULL, 1015 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1016 gShellLevel1HiiHandle, 1017 L"If", 1018 L"Else", 1019 CurrentScriptFile!=NULL 1012 -1, 1013 -1, 1014 NULL, 1015 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1016 gShellLevel1HiiHandle, 1017 L"If", 1018 L"Else", 1019 CurrentScriptFile!=NULL 1020 1020 && CurrentScriptFile->CurrentCommand!=NULL 1021 1021 ? CurrentScriptFile->CurrentCommand->Line:0); … … 1024 1024 if (!MoveToTag(GetPreviousNode, L"if", L"else", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) { 1025 1025 ShellPrintHiiEx( 1026 -1, 1027 -1, 1028 NULL, 1029 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1030 gShellLevel1HiiHandle, 1031 L"If", 1032 L"Else", 1033 CurrentScriptFile!=NULL 1026 -1, 1027 -1, 1028 NULL, 1029 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1030 gShellLevel1HiiHandle, 1031 L"If", 1032 L"Else", 1033 CurrentScriptFile!=NULL 1034 1034 && CurrentScriptFile->CurrentCommand!=NULL 1035 1035 ? CurrentScriptFile->CurrentCommand->Line:0); … … 1039 1039 if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, FALSE, FALSE, FALSE)) { 1040 1040 ShellPrintHiiEx( 1041 -1, 1042 -1, 1043 NULL, 1044 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1045 gShellLevel1HiiHandle, 1046 L"EndIf", 1047 "Else", 1048 CurrentScriptFile!=NULL 1041 -1, 1042 -1, 1043 NULL, 1044 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1045 gShellLevel1HiiHandle, 1046 L"EndIf", 1047 "Else", 1048 CurrentScriptFile!=NULL 1049 1049 && CurrentScriptFile->CurrentCommand!=NULL 1050 1050 ? CurrentScriptFile->CurrentCommand->Line:0); … … 1084 1084 if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) { 1085 1085 ShellPrintHiiEx( 1086 -1, 1087 -1, 1088 NULL, 1089 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1090 gShellLevel1HiiHandle, 1091 L"If", 1092 L"EndIf", 1093 CurrentScriptFile!=NULL 1086 -1, 1087 -1, 1088 NULL, 1089 STRING_TOKEN (STR_SYNTAX_NO_MATCHING), 1090 gShellLevel1HiiHandle, 1091 L"If", 1092 L"EndIf", 1093 CurrentScriptFile!=NULL 1094 1094 && CurrentScriptFile->CurrentCommand!=NULL 1095 1095 ? CurrentScriptFile->CurrentCommand->Line:0); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.c
r58459 r58466 104 104 hits the specified tags. when it hits zero the location has been found. 105 105 106 DecrementerTag and IncrementerTag are used to get around for/endfor and 106 DecrementerTag and IncrementerTag are used to get around for/endfor and 107 107 similar paired types where the entire middle should be ignored. 108 108 109 109 If label is used it will be used instead of the count. 110 110 111 @param[in] Function The function to use to enumerate through the 111 @param[in] Function The function to use to enumerate through the 112 112 list. Normally GetNextNode or GetPreviousNode. 113 113 @param[in] DecrementerTag The tag to decrement the count at. … … 115 115 @param[in] Label A label to look for. 116 116 @param[in, out] ScriptFile The pointer to the current script file structure. 117 @param[in] MovePast TRUE makes function return 1 past the found 117 @param[in] MovePast TRUE makes function return 1 past the found 118 118 location. 119 119 @param[in] FindOnly TRUE to not change the ScriptFile. … … 229 229 hits the specified tags. when it hits zero the location has been found. 230 230 231 DecrementerTag and IncrementerTag are used to get around for/endfor and 231 DecrementerTag and IncrementerTag are used to get around for/endfor and 232 232 similar paired types where the entire middle should be ignored. 233 233 234 234 If label is used it will be used instead of the count. 235 235 236 @param[in] Function The function to use to enumerate through the 236 @param[in] Function The function to use to enumerate through the 237 237 list. Normally GetNextNode or GetPreviousNode. 238 238 @param[in] DecrementerTag The tag to decrement the count at. … … 240 240 @param[in] Label A label to look for. 241 241 @param[in, out] ScriptFile The pointer to the current script file structure. 242 @param[in] MovePast TRUE makes function return 1 past the found 242 @param[in] MovePast TRUE makes function return 1 past the found 243 243 location. 244 244 @param[in] FindOnly TRUE to not change the ScriptFile. 245 @param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in 245 @param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in 246 246 searching. 247 247 **/ -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.h
r58459 r58466 178 178 hits the specified tags. when it hits zero the location has been found. 179 179 180 DecrementerTag and IncrementerTag are used to get around for/endfor and 180 DecrementerTag and IncrementerTag are used to get around for/endfor and 181 181 similar paired types where the entire middle should be ignored. 182 182 183 183 If label is used it will be used instead of the count. 184 184 185 @param[in] Function The function to use to enumerate through the 185 @param[in] Function The function to use to enumerate through the 186 186 list. Normally GetNextNode or GetPreviousNode. 187 187 @param[in] DecrementerTag The tag to decrement the count at. … … 189 189 @param[in] Label A label to look for. 190 190 @param[in, out] ScriptFile The pointer to the current script file structure. 191 @param[in] MovePast TRUE makes function return 1 past the found 191 @param[in] MovePast TRUE makes function return 1 past the found 192 192 location. 193 193 @param[in] FindOnly TRUE to not change the ScriptFile. 194 @param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in 194 @param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in 195 195 searching. 196 196 **/ -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Attrib.c
r58459 r58466 154 154 FileNode->FileName 155 155 ); 156 156 157 157 if (ShellGetExecutionBreakFlag()) { 158 158 ShellStatus = SHELL_ABORTED; -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Cd.c
r58459 r58466 103 103 } 104 104 } 105 105 106 106 if (Param1Copy != NULL) { 107 107 Param1Copy = PathCleanUpDirectories(Param1Copy); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
r58459 r58466 243 243 SHELL_FREE_NON_NULL(DestVolumeInfo); 244 244 } 245 245 246 246 // 247 247 // close files … … 319 319 ASSERT(DestDir != NULL); 320 320 321 321 322 322 Status = ShellLevel2StripQuotes (DestDir, &CleanFilePathStr); 323 323 if (EFI_ERROR (Status)) { … … 328 328 } 329 329 } 330 330 331 331 ASSERT (CleanFilePathStr != NULL); 332 332 … … 441 441 // we have multiple files or a directory in the DestDir 442 442 // 443 443 444 444 // 445 445 // Check for leading slash … … 490 490 } 491 491 } 492 492 493 493 // 494 494 // Make sure the path exists … … 553 553 554 554 /** 555 Validate and if successful copy all the files from the list into 555 Validate and if successful copy all the files from the list into 556 556 destination directory. 557 557 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
r58459 r58466 155 155 EFIAPI 156 156 PrintFileInformation( 157 IN CONST BOOLEAN Sfo, 158 IN CONST EFI_SHELL_FILE_INFO *TheNode, 159 IN UINT64 *Files, 160 IN UINT64 *Size, 157 IN CONST BOOLEAN Sfo, 158 IN CONST EFI_SHELL_FILE_INFO *TheNode, 159 IN UINT64 *Files, 160 IN UINT64 *Size, 161 161 IN UINT64 *Dirs 162 162 ) … … 303 303 EFIAPI 304 304 PrintNonSfoFooter( 305 IN UINT64 Files, 306 IN UINT64 Size, 305 IN UINT64 Files, 306 IN UINT64 Size, 307 307 IN UINT64 Dirs 308 308 ) … … 471 471 CorrectedPath = StrnCatGrow(&CorrectedPath, &LongestPath, L"*", 0); 472 472 Status = ShellOpenFileMetaArg((CHAR16*)CorrectedPath, EFI_FILE_MODE_READ, &ListHead); 473 473 474 474 if (!EFI_ERROR(Status)) { 475 475 for ( Node = (EFI_SHELL_FILE_INFO *)GetFirstNode(&ListHead->Link) … … 498 498 Count, 499 499 TimeZone); 500 500 501 501 // 502 502 // Since it's running recursively, we have to break immediately when returned SHELL_ABORTED … … 694 694 return SHELL_OUT_OF_RESOURCES; 695 695 } 696 696 697 697 if (ShellIsDirectory(PathName) == EFI_SUCCESS) { 698 698 // -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
r58459 r58466 56 56 @param[in] List The list to seatch in. 57 57 @param[in] MetaTarget The item to search for. MetaMatching supported. 58 @param[out] FullName Optional pointer to an allocated buffer containing 58 @param[out] FullName Optional pointer to an allocated buffer containing 59 59 the match. 60 60 @param[in] Meta TRUE to use MetaMatching. 61 61 @param[in] SkipTrailingNumbers TRUE to allow for numbers after the MetaTarget. 62 @param[in] Target The single character that delimits list 63 items (";" normally). 62 @param[in] Target The single character that delimits list 63 items (";" normally). 64 64 **/ 65 65 BOOLEAN … … 120 120 121 121 /** 122 Determine what type of device is represented and return it's string. The 122 Determine what type of device is represented and return it's string. The 123 123 string is in allocated memory and must be callee freed. The HII is is listed below. 124 124 The actual string cannot be determined. … … 876 876 EFI_STATUS Status; 877 877 CHAR16 *NewSName; 878 878 879 879 NewSName = AllocateCopyPool(StrSize(SName) + sizeof(CHAR16), SName); 880 880 if (NewSName == NULL) { … … 928 928 EFI_STATUS Status; 929 929 CHAR16 *NewSName; 930 930 931 931 NewSName = AllocateCopyPool(StrSize(SName) + sizeof(CHAR16), SName); 932 932 if (NewSName == NULL) { -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
r58459 r58466 288 288 return SHELL_INVALID_PARAMETER; 289 289 } 290 } 290 } 291 291 292 292 ASSERT (CleanFilePathStr != NULL); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Parse.c
r58459 r58466 17 17 18 18 /** 19 Do the actual parsing of the file. the file should be SFO output from a 19 Do the actual parsing of the file. the file should be SFO output from a 20 20 shell command or a similar format. 21 21 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c
r58459 r58466 24 24 25 25 @param[in] FileHandle The EFI_HANDLE to the directory. 26 26 27 27 @retval TRUE The directory has no files (or directories). 28 28 @retval FALSE The directory has at least 1 file or directory in it. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
r58459 r58466 78 78 79 79 /** 80 Verify that the DateString is valid and if so set that as the current 80 Verify that the DateString is valid and if so set that as the current 81 81 date. 82 82 … … 290 290 291 291 /** 292 Verify that the TimeString is valid and if so set that as the current 292 Verify that the TimeString is valid and if so set that as the current 293 293 time. 294 294 … … 692 692 693 693 /** 694 Verify that the TimeZoneString is valid and if so set that as the current 694 Verify that the TimeZoneString is valid and if so set that as the current 695 695 timezone. 696 696 … … 956 956 ShellPrintHiiEx (-1, -1, NULL, TimeZoneList[LoopVar].StringId, gShellLevel2HiiHandle); 957 957 break; 958 } 958 } 959 959 } 960 960 } else { -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c
r58459 r58466 315 315 316 316 @param[in] OriginalString pointer to the string to be cleaned. 317 @param[out] CleanString The new string with all quotes removed. 318 Memory allocated in the function and free 317 @param[out] CleanString The new string with all quotes removed. 318 Memory allocated in the function and free 319 319 by caller. 320 320 … … 329 329 { 330 330 CHAR16 *Walker; 331 331 332 332 if (OriginalString == NULL || CleanString == NULL) { 333 333 return EFI_INVALID_PARAMETER; -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.h
r58459 r58466 305 305 306 306 @param[in] OriginalString pointer to the string to be cleaned. 307 @param[out] CleanString The new string with all quotes removed. 308 Memory allocated in the function and free 307 @param[out] CleanString The new string with all quotes removed. 308 Memory allocated in the function and free 309 309 by caller. 310 310 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c
r58459 r58466 117 117 ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellLevel2HiiHandle); 118 118 ShellStatus = SHELL_OUT_OF_RESOURCES; 119 } 119 } 120 120 } 121 121 if (SysInfo != NULL) { … … 128 128 SysInfo); 129 129 } 130 } 130 } 131 131 132 132 FreePool(SysInfo); … … 158 158 159 159 gEfiShellProtocol->CloseFile(ShellFileHandle); 160 160 161 161 ASSERT(SysInfo != NULL); 162 162 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel3CommandsLib/Echo.c
r58459 r58466 104 104 if (ShellCommandLineGetRawValue(Package, ParamCount+1) != NULL) { 105 105 StrnCatGrow(&PrintString, &Size, L" ", 0); 106 } 106 } 107 107 } 108 108 ShellPrintEx(-1, -1, L"%s\r\n", PrintString); -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel3CommandsLib/Help.c
r58459 r58466 232 232 if (ShellGetExecutionBreakFlag ()) { 233 233 break; 234 } 234 } 235 235 if ((gUnicodeCollation->MetaiMatch(gUnicodeCollation, Node->CommandString, CommandToGetHelpOn)) || 236 236 (gEfiShellProtocol->GetAlias(CommandToGetHelpOn, NULL) != NULL && (gUnicodeCollation->MetaiMatch(gUnicodeCollation, Node->CommandString, (CHAR16*)(gEfiShellProtocol->GetAlias(CommandToGetHelpOn, NULL)))))) { -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel3CommandsLib/Type.c
r58459 r58466 85 85 // Allow Line Feed (LF) (0xA) & Carriage Return (CR) (0xD) 86 86 // characters to be displayed as is. 87 // 87 // 88 88 if (AsciiChar == '\n' && ((CHAR8*)Buffer)[LoopVar-1] != '\r') { 89 89 // … … 116 116 LoopSize = ReadSize / (sizeof (CHAR16)); 117 117 } 118 118 119 119 for (LoopVar = 0 ; LoopVar < LoopSize ; LoopVar++) { 120 120 // … … 128 128 // Allow Line Feed (LF) (0xA) & Carriage Return (CR) (0xD) 129 129 // characters to be displayed as is. 130 // 130 // 131 131 if (Ucs2Char == '\n' && ((CHAR16*)Buffer)[LoopVar-1] != '\r') { 132 132 // … … 139 139 continue; 140 140 } 141 } 141 } 142 142 else if (Ucs2Char < 0x20) { 143 143 // -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLib/UefiShellLib.c
r58459 r58466 2670 2670 } 2671 2671 if (mEfiShellInterface != NULL) { 2672 if (mEfiShellInterface->RedirArgc == 0) { 2672 if (mEfiShellInterface->RedirArgc == 0) { 2673 2673 // 2674 2674 // Divide in half for old shell. Must be string length not size. 2675 // 2675 // 2676 2676 Size /=2; // Divide in half only when no redirection. 2677 2677 } … … 3111 3111 return ((UINTN)RetVal); 3112 3112 } 3113 3113 3114 3114 return ((UINTN)(-1)); 3115 3115 } … … 4157 4157 @param[in] CommandToGetHelpOn Pointer to a string containing the command name of help file to be printed. 4158 4158 @param[in] SectionToGetHelpOn Pointer to the section specifier(s). 4159 @param[in] PrintCommandText If TRUE, prints the command followed by the help content, otherwise prints 4159 @param[in] PrintCommandText If TRUE, prints the command followed by the help content, otherwise prints 4160 4160 the help content only. 4161 4161 @retval EFI_DEVICE_ERROR The help data format was incorrect. … … 4173 4173 EFI_STATUS Status; 4174 4174 CHAR16 *OutText; 4175 4175 4176 4176 OutText = NULL; 4177 4177 4178 4178 // 4179 4179 // Get the string to print based 4180 4180 // 4181 4181 Status = gEfiShellProtocol->GetHelpText (CommandToGetHelpOn, SectionToGetHelpOn, &OutText); 4182 4182 4183 4183 // 4184 4184 // make sure we got a valid string … … 4186 4186 if (EFI_ERROR(Status)){ 4187 4187 return Status; 4188 } 4188 } 4189 4189 if (OutText == NULL || StrLen(OutText) == 0) { 4190 return EFI_NOT_FOUND; 4190 return EFI_NOT_FOUND; 4191 4191 } 4192 4192 4193 4193 // 4194 4194 // Chop off trailing stuff we dont need … … 4197 4197 OutText[StrLen(OutText)-1] = CHAR_NULL; 4198 4198 } 4199 4199 4200 4200 // 4201 4201 // Print this out to the console … … 4206 4206 ShellPrintEx(-1, -1, L"%N%s\r\n", OutText); 4207 4207 } 4208 4208 4209 4209 SHELL_FREE_NON_NULL(OutText); 4210 4210 … … 4214 4214 /** 4215 4215 Function to delete a file by name 4216 4216 4217 4217 @param[in] FileName Pointer to file name to delete. 4218 4218 4219 4219 @retval EFI_SUCCESS the file was deleted sucessfully 4220 4220 @retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not … … 4243 4243 EFI_STATUS Status; 4244 4244 SHELL_FILE_HANDLE FileHandle; 4245 4245 4246 4246 Status = ShellFileExists(FileName); 4247 4247 4248 4248 if (Status == EFI_SUCCESS){ 4249 4249 Status = ShellOpenFileByName(FileName, &FileHandle, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, 0x0); … … 4251 4251 Status = ShellDeleteFile(&FileHandle); 4252 4252 } 4253 } 4253 } 4254 4254 4255 4255 return(Status); 4256 4256 4257 4257 } 4258 4258 … … 4261 4261 4262 4262 @param[in] OriginalString pointer to the string to be cleaned. 4263 @param[out] CleanString The new string with all quotes removed. 4264 Memory allocated in the function and free 4263 @param[out] CleanString The new string with all quotes removed. 4264 Memory allocated in the function and free 4265 4265 by caller. 4266 4266 … … 4275 4275 { 4276 4276 CHAR16 *Walker; 4277 4277 4278 4278 if (OriginalString == NULL || CleanString == NULL) { 4279 4279 return EFI_INVALID_PARAMETER; -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLib/UefiShellLib.h
r58459 r58466 77 77 78 78 @param[in] OriginalString pointer to the string to be cleaned. 79 @param[out] CleanString The new string with all quotes removed. 80 Memory allocated in the function and free 79 @param[out] CleanString The new string with all quotes removed. 80 Memory allocated in the function and free 81 81 by caller. 82 82 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
r58459 r58466 88 88 89 89 @param[in] Name The pointer to the string containing the NIC name. 90 90 91 91 @return The pointer to the NIC_INFO if there is a NIC_INFO named by Name. 92 92 @retval NULL No NIC_INFO was found for Name. … … 179 179 @retval EFI_SUCCESS Successfully to get child handle. 180 180 **/ 181 EFI_STATUS 181 EFI_STATUS 182 182 GetChildHandle ( 183 183 IN EFI_HANDLE Controller, … … 209 209 210 210 for (Index = 0; Index < HandleCount; Index++) { 211 211 212 212 Status = TestChildHandle (Controller, Handles[Index], &gEfiManagedNetworkServiceBindingProtocolGuid); 213 213 if (!EFI_ERROR (Status)) { … … 220 220 (VOID **) &ChildDeviceDevicePath 221 221 ); 222 222 223 223 if (!EFI_ERROR (Status)) { 224 224 while (!IsDevicePathEnd (ChildDeviceDevicePath)) { … … 227 227 // Parse one instance 228 228 // 229 if (ChildDeviceDevicePath->Type == HARDWARE_DEVICE_PATH && 229 if (ChildDeviceDevicePath->Type == HARDWARE_DEVICE_PATH && 230 230 ChildDeviceDevicePath->SubType == HW_VENDOR_DP) { 231 231 VendorDeviceNode = (VENDOR_DEVICE_PATH *) ChildDeviceDevicePath; … … 240 240 } 241 241 } 242 } 242 } 243 243 } 244 244 } 245 245 246 246 FreePool (Handles); 247 return Status; 247 return Status; 248 248 } 249 249 … … 287 287 } 288 288 } 289 289 290 290 return String - OriString; 291 291 } … … 297 297 @param ConfigString String to be converted 298 298 **/ 299 CHAR16* 299 CHAR16* 300 300 EFIAPI 301 301 HiiToLower ( … … 367 367 if (ConfigHdr == NULL) { 368 368 return NULL; 369 } 369 } 370 370 371 371 String = ConfigHdr; … … 388 388 String += UnicodeSPrint (String, 10, L"00%x", Name[Index]); 389 389 } 390 390 391 391 // 392 392 // Append L"&PATH=" … … 408 408 409 409 @retval EFI_SUCCESS Get NIC information successfully. 410 **/ 410 **/ 411 411 EFI_STATUS 412 412 EFIAPI … … 414 414 IN EFI_HANDLE Handle, 415 415 OUT NIC_ADDR *NicAddr 416 ) 416 ) 417 417 { 418 418 EFI_STATUS Status; … … 426 426 Status = NetLibCreateServiceChild ( 427 427 Handle, 428 gImageHandle, 428 gImageHandle, 429 429 &gEfiManagedNetworkServiceBindingProtocolGuid, 430 430 &MnpHandle … … 447 447 goto ON_ERROR; 448 448 } 449 449 450 450 NicAddr->Type = (UINT16) SnpMode.IfType; 451 451 NicAddr->Len = (UINT8) SnpMode.HwAddressSize; … … 456 456 NetLibDestroyServiceChild ( 457 457 Handle, 458 gImageHandle, 458 gImageHandle, 459 459 &gEfiManagedNetworkServiceBindingProtocolGuid, 460 460 MnpHandle … … 470 470 @param[in] Handle The network physical device handle. 471 471 @param[out] MediaPresentSupported 472 Upon successful return, TRUE is media present 472 Upon successful return, TRUE is media present 473 473 is supported. FALSE otherwise. 474 @param[out] MediaPresent Upon successful return, TRUE is media present 474 @param[out] MediaPresent Upon successful return, TRUE is media present 475 475 is enabled. FALSE otherwise. 476 476 … … 483 483 OUT BOOLEAN *MediaPresentSupported, 484 484 OUT BOOLEAN *MediaPresent 485 ) 486 485 ) 486 487 487 { 488 488 EFI_STATUS Status; … … 496 496 Status = NetLibCreateServiceChild ( 497 497 Handle, 498 gImageHandle, 498 gImageHandle, 499 499 &gEfiManagedNetworkServiceBindingProtocolGuid, 500 500 &MnpHandle … … 517 517 goto ON_ERROR; 518 518 } 519 519 520 520 *MediaPresentSupported = SnpMode.MediaPresentSupported; 521 521 *MediaPresent = SnpMode.MediaPresent; … … 525 525 NetLibDestroyServiceChild ( 526 526 Handle, 527 gImageHandle, 527 gImageHandle, 528 528 &gEfiManagedNetworkServiceBindingProtocolGuid, 529 529 MnpHandle … … 621 621 StrnCpy (ConfigResp, ConfigHdr, Length + NIC_ITEM_CONFIG_SIZE * 2 + 100 - 1); 622 622 } 623 623 624 624 // 625 625 // Append OFFSET/WIDTH pair … … 713 713 714 714 return EFI_SUCCESS; 715 715 716 716 ON_ERROR: 717 717 if (AccessResults != NULL) { … … 869 869 870 870 Request->Duplicate = FALSE; 871 871 872 872 if (0 == CompareMem (&Request->LocalMac, &Request->DestMac, Request->MacLen)) { 873 873 ShellPrintHiiEx( 874 -1, 875 -1, 874 -1, 875 -1, 876 876 NULL, 877 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 878 gShellNetwork1HiiHandle, 877 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 878 gShellNetwork1HiiHandle, 879 879 L"Already Configured", 880 880 (UINTN)Request->DestIp.v4.Addr[0], … … 886 886 return; 887 887 } 888 888 889 889 for (Index = 0; Index < Request->MacLen; Index++) { 890 890 if (Request->DestMac.Addr[Index] != 0) { … … 898 898 -1, 899 899 NULL, 900 STRING_TOKEN(STR_IFCONFIG_CONF_IP_ADDR), 901 gShellNetwork1HiiHandle, 902 (UINTN)Request->DestMac.Addr[0], 903 (UINTN)Request->DestMac.Addr[1], 900 STRING_TOKEN(STR_IFCONFIG_CONF_IP_ADDR), 901 gShellNetwork1HiiHandle, 902 (UINTN)Request->DestMac.Addr[0], 903 (UINTN)Request->DestMac.Addr[1], 904 904 (UINTN)Request->DestMac.Addr[2], 905 (UINTN)Request->DestMac.Addr[3], 906 (UINTN)Request->DestMac.Addr[4], 905 (UINTN)Request->DestMac.Addr[3], 906 (UINTN)Request->DestMac.Addr[4], 907 907 (UINTN)Request->DestMac.Addr[5] 908 ); 908 ); 909 909 } 910 910 … … 941 941 Status = NetLibCreateServiceChild ( 942 942 NicInfo->Handle, 943 gImageHandle, 943 gImageHandle, 944 944 &gEfiArpServiceBindingProtocolGuid, 945 945 &ArpHandle … … 970 970 Request.LocalMac = NicInfo->NicAddress.MacAddr; 971 971 Request.MacLen = NicInfo->NicAddress.Len; 972 972 973 973 Status = gBS->CreateEvent ( 974 974 EVT_NOTIFY_SIGNAL, … … 978 978 &Request.OnResolved 979 979 ); 980 980 981 981 if (EFI_ERROR (Status)) { 982 982 goto ON_EXIT; 983 983 } 984 984 985 985 ArpCfgData.SwAddressType = 0x0800; 986 986 ArpCfgData.SwAddressLength = 4; … … 989 989 ArpCfgData.RetryCount = 3; 990 990 ArpCfgData.RetryTimeOut = 0; 991 991 992 992 Status = Arp->Configure (Arp, &ArpCfgData); 993 993 994 994 if (EFI_ERROR (Status)) { 995 995 goto ON_EXIT; … … 1002 1002 &Request.DestMac 1003 1003 ); 1004 1004 1005 1005 if (EFI_ERROR (Status) && (Status != EFI_NOT_READY)) { 1006 1006 goto ON_EXIT; … … 1008 1008 1009 1009 while (!ArpResolved) { 1010 1010 1011 1011 } 1012 1012 … … 1017 1017 1018 1018 NetLibDestroyServiceChild ( 1019 NicInfo->Handle, 1020 gImageHandle, 1021 &gEfiArpServiceBindingProtocolGuid, 1019 NicInfo->Handle, 1020 gImageHandle, 1021 &gEfiArpServiceBindingProtocolGuid, 1022 1022 ArpHandle 1023 1023 ); … … 1122 1122 &TimerToGetMap 1123 1123 ); 1124 1124 1125 1125 if (EFI_ERROR (Status)) { 1126 1126 goto ON_EXIT; 1127 1127 } 1128 1128 1129 1129 Status = gBS->SetTimer ( 1130 1130 TimerToGetMap, … … 1132 1132 MultU64x32 (SecondsToNanoSeconds, 5) 1133 1133 ); 1134 1134 1135 1135 if (EFI_ERROR (Status)) { 1136 1136 goto ON_EXIT; … … 1138 1138 1139 1139 ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_WAIT_SET_DONE), gShellNetwork1HiiHandle); 1140 1140 1141 1141 while (!mTimeout) { 1142 1142 Ip4->Poll (Ip4); 1143 1144 if (!EFI_ERROR (Ip4->GetModeData (Ip4, &Ip4Mode, NULL, NULL)) && 1145 Ip4Mode.IsConfigured) { 1143 1144 if (!EFI_ERROR (Ip4->GetModeData (Ip4, &Ip4Mode, NULL, NULL)) && 1145 Ip4Mode.IsConfigured) { 1146 1146 break; 1147 1147 } 1148 } 1148 } 1149 1149 } 1150 1150 … … 1153 1153 if ((Status == EFI_SUCCESS) && Ip4Mode.IsConfigured) { 1154 1154 ShellPrintHiiEx( 1155 -1, 1156 -1, 1155 -1, 1156 -1, 1157 1157 NULL, 1158 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1159 gShellNetwork1HiiHandle, 1158 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1159 gShellNetwork1HiiHandle, 1160 1160 L"Default", 1161 1161 (UINTN)Ip4Mode.ConfigData.StationAddress.Addr[0], … … 1165 1165 ); 1166 1166 } 1167 1168 ON_EXIT: 1167 1168 ON_EXIT: 1169 1169 1170 1170 if (EFI_ERROR (Status)) { … … 1183 1183 Ip4Handle 1184 1184 ); 1185 1185 1186 1186 return Status; 1187 1187 } … … 1248 1248 DhcpTemp = DhcpString; 1249 1249 StaticTemp = StaticString; 1250 1250 1251 1251 if (StringNoCaseCompare(&Temp, &DhcpTemp) == 0) { 1252 1252 // … … 1287 1287 // 1288 1288 // validate the parameter, two forms: eth0 static IP NETMASK GATEWAY and 1289 // eth0 static IP NETMASK GATEWAY permanent 1289 // eth0 static IP NETMASK GATEWAY permanent 1290 1290 // 1291 1291 if ((Argc != 5) && (Argc != 6)) { … … 1359 1359 if (!IP4_NET_EQUAL (Ip.Addr[0], Gateway.Addr[0], Mask.Addr[0]) || 1360 1360 !NetIp4IsUnicast (NetworkBytes1, NetworkBytes2)) { 1361 1361 1362 1362 ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_INVALID_GATEWAY), gShellNetwork1HiiHandle); 1363 1363 ASSERT(ShellStatus == SHELL_INVALID_PARAMETER); … … 1367 1367 // 1368 1368 // Set the configuration up, two route table entries are added: 1369 // one for the direct connected network, and another for the 1369 // one for the direct connected network, and another for the 1370 1370 // default gateway. Remember, some structure members are cleared 1371 1371 // by AllocateZeroPool … … 1399 1399 ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_SET_FAIL), gShellNetwork1HiiHandle, ShellStatus^MAX_BIT); 1400 1400 goto ON_EXIT; 1401 } 1401 } 1402 1402 1403 1403 Status = IfconfigStartIp4 (Info); … … 1409 1409 ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_IP_CHILD_FAIL), gShellNetwork1HiiHandle, ShellStatus^MAX_BIT); 1410 1410 } 1411 1411 1412 1412 ON_EXIT: 1413 1413 SHELL_FREE_NON_NULL(Config); 1414 1414 1415 1415 return ShellStatus; 1416 1416 } … … 1419 1419 Show the address information for the nic specified. 1420 1420 1421 @param[in] Name A pointer to the string containg the nic's name, if NULL, 1421 @param[in] Name A pointer to the string containg the nic's name, if NULL, 1422 1422 all nics' information is shown. 1423 1423 **/ … … 1450 1450 -1, 1451 1451 NULL, 1452 STRING_TOKEN(STR_IFCONFIG_SHOW_MAC_ADDR), 1453 gShellNetwork1HiiHandle, 1454 (UINTN)NicInfo->NicAddress.MacAddr.Addr[0], 1455 (UINTN)NicInfo->NicAddress.MacAddr.Addr[1], 1452 STRING_TOKEN(STR_IFCONFIG_SHOW_MAC_ADDR), 1453 gShellNetwork1HiiHandle, 1454 (UINTN)NicInfo->NicAddress.MacAddr.Addr[0], 1455 (UINTN)NicInfo->NicAddress.MacAddr.Addr[1], 1456 1456 (UINTN)NicInfo->NicAddress.MacAddr.Addr[2], 1457 (UINTN)NicInfo->NicAddress.MacAddr.Addr[3], 1458 (UINTN)NicInfo->NicAddress.MacAddr.Addr[4], 1457 (UINTN)NicInfo->NicAddress.MacAddr.Addr[3], 1458 (UINTN)NicInfo->NicAddress.MacAddr.Addr[4], 1459 1459 (UINTN)NicInfo->NicAddress.MacAddr.Addr[5] 1460 ); 1460 ); 1461 1461 1462 1462 Print (L" Media State: %s\n", NicInfo->MediaPresent ? L"Media present" : L"Media disconnected"); … … 1465 1465 ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_NIC_NOT_CONFIGURED), gShellNetwork1HiiHandle); 1466 1466 continue; 1467 } 1467 } 1468 1468 1469 1469 if (NicInfo->ConfigInfo->Source == IP4_CONFIG_SOURCE_DHCP) { … … 1484 1484 1485 1485 ShellPrintHiiEx( 1486 -1, 1487 -1, 1486 -1, 1487 -1, 1488 1488 NULL, 1489 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1490 gShellNetwork1HiiHandle, 1489 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1490 gShellNetwork1HiiHandle, 1491 1491 L"IP address", 1492 1492 (UINTN)Ip4Config->StationAddress.Addr[0], … … 1496 1496 ); 1497 1497 ShellPrintHiiEx( 1498 -1, 1499 -1, 1498 -1, 1499 -1, 1500 1500 NULL, 1501 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1502 gShellNetwork1HiiHandle, 1501 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1502 gShellNetwork1HiiHandle, 1503 1503 L"Mask", 1504 1504 (UINTN)Ip4Config->SubnetMask.Addr[0], … … 1509 1509 1510 1510 ZeroMem (&Gateway, sizeof (EFI_IPv4_ADDRESS)); 1511 1511 1512 1512 for (Index = 0; Index < Ip4Config->RouteTableSize; Index++) { 1513 1513 if ((CompareMem (&Ip4Config->RouteTable[Index].SubnetAddress, &mZeroIp4Addr, sizeof (EFI_IPv4_ADDRESS)) == 0) && … … 1516 1516 } 1517 1517 } 1518 1518 1519 1519 ShellPrintHiiEx( 1520 -1, 1521 -1, 1520 -1, 1521 -1, 1522 1522 NULL, 1523 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1524 gShellNetwork1HiiHandle, 1523 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1524 gShellNetwork1HiiHandle, 1525 1525 L"Gateway", 1526 1526 (UINTN)Gateway.Addr[0], … … 1536 1536 1537 1537 ShellPrintHiiEx( 1538 -1, 1539 -1, 1538 -1, 1539 -1, 1540 1540 NULL, 1541 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1542 gShellNetwork1HiiHandle, 1541 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1542 gShellNetwork1HiiHandle, 1543 1543 L"Subnet", 1544 1544 (UINTN)Ip4Config->RouteTable[Index].SubnetAddress.Addr[0], … … 1549 1549 1550 1550 ShellPrintHiiEx( 1551 -1, 1552 -1, 1551 -1, 1552 -1, 1553 1553 NULL, 1554 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1555 gShellNetwork1HiiHandle, 1554 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1555 gShellNetwork1HiiHandle, 1556 1556 L"Netmask", 1557 1557 (UINTN)Ip4Config->RouteTable[Index].SubnetMask.Addr[0], … … 1562 1562 1563 1563 ShellPrintHiiEx( 1564 -1, 1565 -1, 1564 -1, 1565 -1, 1566 1566 NULL, 1567 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1568 gShellNetwork1HiiHandle, 1567 STRING_TOKEN (STR_IFCONFIG_SHOW_IP_ADDR), 1568 gShellNetwork1HiiHandle, 1569 1569 L"Gateway", 1570 1570 (UINTN)Ip4Config->RouteTable[Index].GatewayAddress.Addr[0], … … 1582 1582 Clear address configuration for the nic specified. 1583 1583 1584 @param[in] Name A pointer to the string containg the nic's name, 1584 @param[in] Name A pointer to the string containg the nic's name, 1585 1585 if NULL, all nics address configurations are cleared. 1586 1586 … … 1598 1598 NIC_INFO *Info; 1599 1599 EFI_STATUS Status; 1600 1600 1601 1601 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &NicInfoList) { 1602 1602 Info = BASE_CR (Entry, NIC_INFO, Link); … … 1606 1606 } 1607 1607 1608 // if (Info->NicIp4Config == NULL) { 1608 // if (Info->NicIp4Config == NULL) { 1609 1609 Status = IfconfigSetNicAddrByHii (Info, NULL); 1610 1610 // } else { … … 1618 1618 1619 1619 return EFI_SUCCESS; 1620 1620 1621 1621 } 1622 1622 … … 1687 1687 goto Done; 1688 1688 } 1689 1690 1689 1690 1691 1691 Status = IfconfigGetAllNicInfoByHii (); 1692 1692 if (EFI_ERROR (Status)) { … … 1707 1707 ShellStatus = SHELL_INVALID_PARAMETER; 1708 1708 goto Done; 1709 } 1710 1709 } 1710 1711 1711 // 1712 1712 // Show the configuration. -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ping.c
r58459 r58466 23 23 // Function templates to match the IPv4 and IPv6 commands that we use. 24 24 // 25 typedef 25 typedef 26 26 EFI_STATUS 27 27 (EFIAPI *PING_IPX_POLL)( 28 28 IN VOID *This 29 ); 30 31 typedef 29 ); 30 31 typedef 32 32 EFI_STATUS 33 33 (EFIAPI *PING_IPX_TRANSMIT)( … … 36 36 ); 37 37 38 typedef 38 typedef 39 39 EFI_STATUS 40 40 (EFIAPI *PING_IPX_RECEIVE)( 41 41 IN VOID *This, 42 42 IN VOID *Token 43 ); 43 ); 44 44 45 45 typedef … … 51 51 52 52 /// 53 /// A set of pointers to either IPv6 or IPv4 functions. 53 /// A set of pointers to either IPv6 or IPv4 functions. 54 54 /// Unknown which one to the ping command. 55 55 /// … … 69 69 // 70 70 // PING_IPX_COMPLETION_TOKEN 71 // structures are used for both transmit and receive operations. 71 // structures are used for both transmit and receive operations. 72 72 // This version is IP-unaware. 73 73 // … … 142 142 @param[in] Length Length to be checksummed. 143 143 144 @retval Checksum Returns the 16 bit ones complement of 144 @retval Checksum Returns the 16 bit ones complement of 145 145 ones complement sum of 16 bit words 146 146 **/ … … 243 243 CurrentTick += 1000000; 244 244 } 245 245 246 246 return CurrentTick; 247 247 } … … 467 467 goto ON_EXIT; 468 468 } 469 if (!IP6_IS_MULTICAST ((EFI_IPv6_ADDRESS*)&Private->DstAddress) && 469 if (!IP6_IS_MULTICAST ((EFI_IPv6_ADDRESS*)&Private->DstAddress) && 470 470 !EFI_IP6_EQUAL (&((EFI_IP6_RECEIVE_DATA*)Private->RxToken.Packet.RxData)->Header->SourceAddress, (EFI_IPv6_ADDRESS*)&Private->DstAddress)) { 471 471 goto ON_EXIT; … … 478 478 Reply = ((EFI_IP4_RECEIVE_DATA*)Private->RxToken.Packet.RxData)->FragmentTable[0].FragmentBuffer; 479 479 PayLoad = ((EFI_IP4_RECEIVE_DATA*)Private->RxToken.Packet.RxData)->DataLength; 480 if (!IP4_IS_MULTICAST (EFI_IP4(*(EFI_IPv4_ADDRESS*)Private->DstAddress)) && 480 if (!IP4_IS_MULTICAST (EFI_IP4(*(EFI_IPv4_ADDRESS*)Private->DstAddress)) && 481 481 !EFI_IP4_EQUAL (&((EFI_IP4_RECEIVE_DATA*)Private->RxToken.Packet.RxData)->Header->SourceAddress, (EFI_IPv4_ADDRESS*)&Private->DstAddress)) { 482 482 goto ON_EXIT; … … 487 487 } 488 488 } 489 489 490 490 491 491 if (PayLoad != Private->BufferSize) { … … 979 979 ); 980 980 } 981 981 982 982 // 983 983 // Skip the ones not in current use. … … 1165 1165 Private->ProtocolPointers.Receive = (PING_IPX_RECEIVE )((EFI_IP4_PROTOCOL*)Private->IpProtocol)->Receive; 1166 1166 Private->ProtocolPointers.Cancel = (PING_IPX_CANCEL )((EFI_IP4_PROTOCOL*)Private->IpProtocol)->Cancel; 1167 Private->ProtocolPointers.Poll = (PING_IPX_POLL )((EFI_IP4_PROTOCOL*)Private->IpProtocol)->Poll; 1167 Private->ProtocolPointers.Poll = (PING_IPX_POLL )((EFI_IP4_PROTOCOL*)Private->IpProtocol)->Poll; 1168 1168 } 1169 1169 … … 1449 1449 1450 1450 // 1451 // we use IPv6 buffers to hold items... 1451 // we use IPv6 buffers to hold items... 1452 1452 // make sure this is enough space! 1453 1453 // -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
r58459 r58466 63 63 gEfiIp6ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES 64 64 gEfiIp6ConfigProtocolGuid ## SOMETIMES_CONSUMES 65 65 66 66 [Guids] 67 67 gShellNetwork1HiiGuid ## SOMETIMES_CONSUMES ## HII -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Readme.txt
r48674 r58466 8 8 HOW TO INCORPORATE THIS SHELL INTO NT32 9 9 ============================================================================ 10 The instructions below are included as a sample and template on how a 10 The instructions below are included as a sample and template on how a 11 11 developer may integrate this code into an existing platform: 12 12 -
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/ShellPkg.dec
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/ShellPkg.dsc
r58459 r58466 29 29 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.inf 30 30 DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf 31 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 31 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 32 32 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf 33 33 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf … … 47 47 SortLib|ShellPkg/Library/UefiSortLib/UefiSortLib.inf 48 48 HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf 49 49 50 50 PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf 51 51 PathLib|ShellPkg/Library/BasePathLib/BasePathLib.inf
Note:
See TracChangeset
for help on using the changeset viewer.