Changeset 85718 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Application/Shell/FileHandleWrappers.c
- Timestamp:
- Aug 12, 2020 4:09:12 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139865
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-133213 /vendor/edk2/current 103735-103757,103769-103776,129194-139864
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Application/Shell/FileHandleWrappers.c
r80721 r85718 518 518 519 519 // 520 // Limit the line length to the buffer size or the minimu nsize of the520 // Limit the line length to the buffer size or the minimum size of the 521 521 // screen. (The smaller takes effect) 522 522 // … … 866 866 if (Key.UnicodeChar != CHAR_BACKSPACE && !(Key.UnicodeChar == 0 && Key.ScanCode == SCAN_DELETE)) { 867 867 // 868 // Cal ulate row and column of the tail of current string868 // Calculate row and column of the tail of current string 869 869 // 870 870 TailRow = Row + (StringLen - StringCurPos + Column + OutputLength) / TotalColumn; … … 933 933 934 934 // 935 // FILE s ytle interfaces for StdIn/StdOut/StdErr935 // FILE style interfaces for StdIn/StdOut/StdErr 936 936 // 937 937 EFI_FILE_PROTOCOL FileInterfaceStdIn = { … … 1070 1070 ((CHAR16*)NewBuffer)[TotalSize / sizeof (CHAR16) - 3] = CHAR_NULL; 1071 1071 // 1072 // If the NewBuffer end with \r\n\0, We will rep ace '\r' by '\0' and then update TotalSize.1072 // If the NewBuffer end with \r\n\0, We will replace '\r' by '\0' and then update TotalSize. 1073 1073 // 1074 1074 TotalSize -= sizeof(CHAR16) * 2; … … 1645 1645 if ((UINTN)(MemFile->Position + (*BufferSize)) > (UINTN)(MemFile->BufferSize)) { 1646 1646 MemFile->Buffer = ReallocatePool((UINTN)(MemFile->BufferSize), (UINTN)(MemFile->BufferSize) + (*BufferSize) + MEM_WRITE_REALLOC_OVERHEAD, MemFile->Buffer); 1647 if (MemFile->Buffer == NULL){ 1648 return EFI_OUT_OF_RESOURCES; 1649 } 1647 1650 MemFile->BufferSize += (*BufferSize) + MEM_WRITE_REALLOC_OVERHEAD; 1648 1651 } … … 1662 1665 if ((UINTN)(MemFile->Position + AsciiStrSize(AsciiBuffer)) > (UINTN)(MemFile->BufferSize)) { 1663 1666 MemFile->Buffer = ReallocatePool((UINTN)(MemFile->BufferSize), (UINTN)(MemFile->BufferSize) + AsciiStrSize(AsciiBuffer) + MEM_WRITE_REALLOC_OVERHEAD, MemFile->Buffer); 1667 if (MemFile->Buffer == NULL){ 1668 FreePool(AsciiBuffer); 1669 return EFI_OUT_OF_RESOURCES; 1670 } 1664 1671 MemFile->BufferSize += AsciiStrSize(AsciiBuffer) + MEM_WRITE_REALLOC_OVERHEAD; 1665 1672 }
Note:
See TracChangeset
for help on using the changeset viewer.