SHEL19
authorhfang <hfang@0aefa8ac-fc23-0410-b7a3-bf826d37e4c2>
Tue, 25 Nov 2008 05:49:58 +0000 (05:49 +0000)
committerhfang <hfang@0aefa8ac-fc23-0410-b7a3-bf826d37e4c2>
Tue, 25 Nov 2008 05:49:58 +0000 (05:49 +0000)
git-svn-id: https://efi-shell.tianocore.org/svn/efi-shell/trunk/Shell@32 0aefa8ac-fc23-0410-b7a3-bf826d37e4c2

EDK_Snapshot.txt
Library/ConsistMapping.c
Library/DPath.c
Library/EfiShellLib.h
Library/Misc.c
shellenv/ShellenvStrings.uni
shellenv/batch.c
shellenv/conio.c
shellenv/dprot.c
shellenv/protid.c

index 0ceff6e..6e64fb0 100644 (file)
@@ -1,5 +1,5 @@
 Notes:
-  This EFI Shell release package has been tested on the 2008-06-23's EDK which snapshot
-is Edk-Dev-Snapshot-20080623, User can get this version EDK from the following URL:
-  https://edk.tianocore.org/files/documents/16/489/Edk-Dev-Snapshot-20080905.zip
+  This EFI Shell release package has been tested on the 2008-11-21's EDK which snapshot
+is Edk-Dev-Snapshot-20081121, User can get this version EDK from the following URL:
+  https://edk.tianocore.org/files/documents/16/495/Edk-Dev-Snapshot-20081121.zip
   We don't guarantee this package can work correctly on the other EDK snapshot.
\ No newline at end of file
index d8a7d03..b70fa06 100644 (file)
@@ -1072,6 +1072,7 @@ ConsistMappingGenMappingName (
   CatPrint (&Str, L"%d", (UINTN) MappingInfo.HI);
   if (MappingInfo.CSD.str != NULL) {
     CatPrint (&Str, L"%s", MappingInfo.CSD.str);
+    FreePool (MappingInfo.CSD.str);
   }
 
   NewSize           = (Str.len + 1) * sizeof (CHAR16);
index acadc84..f0974ac 100644 (file)
@@ -1206,6 +1206,28 @@ _DevPathFvFilePath (
   CatPrint (Str, L"%g", &FvFilePath->NameGuid);
 }
 
+VOID
+_DevPathRelativeOffsetRange (
+  IN OUT POOL_PRINT       *Str,
+  IN VOID                 *DevPath
+  )
+{
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;
+
+  ASSERT (Str != NULL);
+  ASSERT (DevPath != NULL);
+
+  Offset = DevPath;
+  CatPrint (
+    Str,
+    L"Offset(%lx,%lx)",
+    Offset->StartingOffset,
+    Offset->EndingOffset
+    );
+  
+}
+
+
 VOID
 _DevPathBssBss (
   IN OUT POOL_PRINT       *Str,
@@ -1395,6 +1417,9 @@ DevPathTable[] = {
   MEDIA_DEVICE_PATH,
   MEDIA_FV_FILEPATH_DP,
   _DevPathFvFilePath,
+  MEDIA_DEVICE_PATH,
+  MEDIA_RELATIVE_OFFSET_RANGE_DP,
+  _DevPathRelativeOffsetRange,
   BBS_DEVICE_PATH,
   BBS_BBS_DP,
   _DevPathBssBss,
index 1ad6470..46c0316 100644 (file)
@@ -105,6 +105,7 @@ Revision History
 #include EFI_PROTOCOL_DEFINITION (LoadedImage)
 #include EFI_PROTOCOL_DEFINITION (LoadedImageDevicePath)
 #include EFI_PROTOCOL_DEFINITION (LoadFile)
+#include EFI_PROTOCOL_DEFINITION (LoadFile2)
 #include EFI_PROTOCOL_DEFINITION (PciHostBridgeResourceAllocation)
 #include EFI_PROTOCOL_DEFINITION (PciIo)
 #include EFI_PROTOCOL_DEFINITION (PciRootBridgeIo)
index f485b16..d5adb14 100644 (file)
@@ -137,6 +137,8 @@ KnownGuids[] = {
   //
   &gEfiLoadFileProtocolGuid,
   L"Load",
+  &gEfiLoadFile2ProtocolGuid,
+  L"Load2",
   &gEfiSimpleFileSystemProtocolGuid,
   L"Fs",
   &gEfiFileInfoGuid,
index b390e67..0851eed 100644 (file)
Binary files a/shellenv/ShellenvStrings.uni and b/shellenv/ShellenvStrings.uni differ
index 0aad466..24fef35 100644 (file)
@@ -2101,7 +2101,6 @@ Returns:
   if (BufSize       == sizeof (ByteOrderMark) &&
       ByteOrderMark == EFI_UNICODE_BYTE_ORDER_MARK) {
     *IsAscii = FALSE;
-
   } else {
     *IsAscii = TRUE;
   }
index 4514ccf..526e6f3 100644 (file)
@@ -1,6 +1,6 @@
 /*++
 
-Copyright (c) 2005 - 2006, Intel Corporation                                                         
+Copyright (c) 2005 - 2008, Intel Corporation                                                         
 All rights reserved. This program and the accompanying materials                          
 are licensed and made available under the terms and conditions of the BSD License         
 which accompanies this distribution. The full text of the license may be found at         
@@ -458,21 +458,21 @@ Returns:
 {
   CHAR16                        *Str;
   BOOLEAN                       Done;
-  UINTN                         Column;
-  UINTN                         Row;
-  UINTN                         StartColumn;
-  UINTN                         Update;
-  UINTN                         Delete;
-  UINTN                         Len;
-  UINTN                         StrPos;
-  UINTN                         MaxStr;
+  UINTN                         Column;         // Column of current cursor
+  UINTN                         Row;            // Row of current cursor
+  UINTN                         StartColumn;    // Column at the beginning of the line
+  UINTN                         Update;         // Line index for update
+  UINTN                         Delete;         // Num of chars to delete from console after update
+  UINTN                         Len;            // Total length of the line
+  UINTN                         StrPos;         // Line index corresponding to the cursor
+  UINTN                         MaxStr;         // Maximum possible line length
   UINTN                         Index;
-  UINTN                         LineLength;
-  UINTN                         TotalRow;
+  UINTN                         LineLength;     // Num of columns in the console
+  UINTN                         TotalRow;       // Num of rows in the console
   UINTN                         SkipLength;
-  UINTN                         OutputLength;
-  UINTN                         TailRow;
-  UINTN                         TailColumn;
+  UINTN                         OutputLength;   // Length of the update string
+  UINTN                         TailRow;        // Row of end of line
+  UINTN                         TailColumn;     // Column of end of line
   EFI_INPUT_KEY                 Key;
   EFI_SIMPLE_TEXT_OUT_PROTOCOL  *ConOut;
   EFI_SIMPLE_TEXT_IN_PROTOCOL   *ConIn;
@@ -482,7 +482,7 @@ Returns:
   EFI_LIST_ENTRY                *NewPos;
   BOOLEAN                       InScrolling;
   EFI_STATUS                    Status;
-  BOOLEAN                       InTabScrolling;
+  BOOLEAN                       InTabScrolling; // Whether in TAB-completion state
   EFI_LIST_ENTRY                DirList;
   SHELL_FILE_ARG                *Arg;
   EFI_LIST_ENTRY                *TabLinePos;
@@ -492,8 +492,8 @@ Returns:
   BOOLEAN                       HasSpaceInTabOutputStr;
   BOOLEAN                       InQuotationMode;
   CHAR16                        *TempStr;
-  UINTN                         TabPos;
-  UINTN                         TabUpdatePos;
+  UINTN                         TabPos;         // Start index of the string to search for TAB completion.
+  UINTN                         TabUpdatePos;   // Start index of the string updated by TAB stroke
   UINTN                         Count;
 
   ConOut            = ST->ConOut;
@@ -822,8 +822,11 @@ Returns:
       if (Arg && (Arg->Status != EFI_SUCCESS)) {
         continue;
       }
-      Column = StartColumn + TabUpdatePos % LineLength;
-      Row -= (Len - StrPos + Column + OutputLength) / LineLength;
+      //
+      // Adjust the column and row to the start of TAB-completion string.
+      //
+      Column = (StartColumn + TabUpdatePos) % LineLength;
+      Row -= (StartColumn + StrPos) / LineLength - (StartColumn + TabUpdatePos) / LineLength;
       HasSpaceInTabOutputStr = FALSE;
       OutputLength = StrLen (Arg->FileName);
       //
index d19a833..d68d297 100644 (file)
@@ -70,6 +70,7 @@ STATIC CHAR16 *SEnvDP_MediaStr[] = {
   L"Media Protocol",
   L"PIWG FV",
   L"PIWG Firmware File",
+  L"Relative Offset Range",
 };
 
 STATIC CHAR16 *SEnvDP_BBS_Str[] = { L"Illegal", L"BIOS Boot Spec" };
@@ -593,6 +594,8 @@ Returns:
   VENDOR_DEVICE_PATH          *VendorDevicePath;
   FILEPATH_DEVICE_PATH        *FilePath;
   MEDIA_PROTOCOL_DEVICE_PATH  *MediaProtocol;
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
+                              *Offset;
 
   if (DevicePathType (DevicePath) != MEDIA_DEVICE_PATH) {
     return ;
@@ -650,6 +653,11 @@ Returns:
     MediaProtocol = (MEDIA_PROTOCOL_DEVICE_PATH *) DevicePath;
     PrintToken (STRING_TOKEN (STR_SHELLENV_DPROT_PROTOCOL_2), HiiEnvHandle, &MediaProtocol->Protocol);
     break;
+
+  case MEDIA_RELATIVE_OFFSET_RANGE_DP:
+    Offset = (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *) DevicePath;
+    PrintToken (STRING_TOKEN (STR_SHELLENV_DPROT_OFFSET), HiiEnvHandle, Offset->StartingOffset, Offset->EndingOffset);
+
   };
 
   //
@@ -679,7 +687,7 @@ struct DevicePathTypes  SEnvDP_Strings[] = {
   SEnvDP_MessageStr,
   SEnvMessagingDevicePathEntry,
   0x04,
-  0x07,
+  0x08,
   L"Media",
   SEnvDP_MediaStr,
   SEnvMediaDevicePathEntry,
@@ -1703,4 +1711,4 @@ SEnvDriverEFIVersionTok (
     HiiEnvHandle,
     DriverEfiVersion->FirmwareVersion
     );
-}
\ No newline at end of file
+}
index 6b5431c..2d162d3 100644 (file)
@@ -197,6 +197,10 @@ SEnvInternalProtocolInfo[] = {
   NULL,
   NULL,
   LOAD_FILE_PROTOCOL_GUID,
+  L"Load2",
+  NULL,
+  NULL,
+  EFI_LOAD_FILE2_PROTOCOL_GUID,
   L"Fs",
   NULL,
   NULL,