VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103777
Message:

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ConsoleWrappers.c

    r58459 r58466  
    116116
    117117/**
    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
    119119  SHELL_FILE_HANDLE to support redirecting input from a file.
    120120
     
    156156  ProtocolToReturn->SimpleTextIn.Reset         = FileBasedSimpleTextInReset;
    157157  ProtocolToReturn->SimpleTextIn.ReadKeyStroke = FileBasedSimpleTextInReadKeyStroke;
    158  
     158
    159159  Status = gBS->CreateEvent (
    160160                  EVT_NOTIFY_WAIT,
     
    171171  ///@todo possibly also install SimpleTextInputEx on the handle at this point.
    172172  Status = gBS->InstallProtocolInterface(
    173     &(ProtocolToReturn->TheHandle), 
    174     &gEfiSimpleTextInProtocolGuid, 
    175     EFI_NATIVE_INTERFACE, 
     173    &(ProtocolToReturn->TheHandle),
     174    &gEfiSimpleTextInProtocolGuid,
     175    EFI_NATIVE_INTERFACE,
    176176    &(ProtocolToReturn->SimpleTextIn));
    177177  if (!EFI_ERROR(Status)) {
     
    185185
    186186/**
    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
    188188  SHELL_FILE_HANDLE to support redirecting input from a file.
    189189
     
    208208
    209209  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,
    212212    &(((SHELL_EFI_SIMPLE_TEXT_INPUT_PROTOCOL*)SimpleTextIn)->SimpleTextIn));
    213213
     
    278278{
    279279  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *PassThruProtocol;
    280  
     280
    281281  PassThruProtocol = ((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *)This)->OriginalSimpleTextOut;
    282  
     282
    283283  // Pass the QueryMode call thru to the original SimpleTextOutProtocol
    284284  return (PassThruProtocol->QueryMode(
     
    416416
    417417/**
    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
    419419  SHELL_FILE_HANDLE to support redirecting output from a file.
    420420
     
    469469
    470470  Status = gBS->InstallProtocolInterface(
    471     &(ProtocolToReturn->TheHandle), 
    472     &gEfiSimpleTextOutProtocolGuid, 
    473     EFI_NATIVE_INTERFACE, 
     471    &(ProtocolToReturn->TheHandle),
     472    &gEfiSimpleTextOutProtocolGuid,
     473    EFI_NATIVE_INTERFACE,
    474474    &(ProtocolToReturn->SimpleTextOut));
    475475  if (!EFI_ERROR(Status)) {
     
    483483
    484484/**
    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
    486486  SHELL_FILE_HANDLE to support redirecting output from a file.
    487487
     
    501501  }
    502502  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,
    505505    &(((SHELL_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*)SimpleTextOut)->SimpleTextOut));
    506506  FreePool(SimpleTextOut);
  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ConsoleWrappers.h

    r58459 r58466  
    1818
    1919/**
    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
    2121  SHELL_FILE_HANDLE to support redirecting input from a file.
    2222
     
    3535
    3636/**
    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
    3838  SHELL_FILE_HANDLE to support redirecting input from a file.
    3939
     
    4949
    5050/**
    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
    5252  SHELL_FILE_HANDLE to support redirecting output from a file.
    5353
     
    6868
    6969/**
    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
    7171  SHELL_FILE_HANDLE to support redirecting output from a file.
    7272
  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/FileHandleWrappers.c

    r58459 r58466  
    1919
    2020/**
    21   File style interface for console (Open). 
    22  
     21  File style interface for console (Open).
     22
    2323  @param[in] This       Ignored.
    2424  @param[out] NewHandle Ignored.
     
    2626  @param[in] OpenMode   Ignored.
    2727  @param[in] Attributes Ignored.
    28  
     28
    2929  @retval EFI_NOT_FOUND
    3030**/
     
    4444/**
    4545  File style interface for console (Close, Delete, & Flush)
    46  
     46
    4747  @param[in] This       Ignored.
    48  
     48
    4949  @retval EFI_SUCCESS
    5050**/
     
    6363  @param[in] This       Ignored.
    6464  @param[out] Position  Ignored.
    65  
     65
    6666  @retval EFI_UNSUPPORTED
    6767**/
     
    7878/**
    7979  File style interface for console (SetPosition).
    80  
     80
    8181  @param[in] This       Ignored.
    8282  @param[in] Position   Ignored.
    83  
     83
    8484  @retval EFI_UNSUPPORTED
    8585**/
     
    9696/**
    9797  File style interface for console (GetInfo).
    98  
     98
    9999  @param[in] This              Ignored.
    100100  @param[in] InformationType   Ignored.
    101101  @param[in, out] BufferSize   Ignored.
    102102  @param[out] Buffer           Ignored.
    103  
     103
    104104  @retval EFI_UNSUPPORTED
    105105**/
     
    118118/**
    119119  File style interface for console (SetInfo).
    120  
     120
    121121  @param[in] This       Ignored.
    122122  @param[in] InformationType   Ignored.
    123123  @param[in] BufferSize Ignored.
    124124  @param[in] Buffer     Ignored.
    125  
     125
    126126  @retval EFI_UNSUPPORTED
    127127**/
     
    142142
    143143  Writes data to the screen.
    144  
     144
    145145  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    146146  @param[in, out] BufferSize   Size in bytes of Buffer.
    147147  @param[in] Buffer            The pointer to the buffer to write.
    148  
     148
    149149  @retval EFI_UNSUPPORTED No output console is supported.
    150150  @return A return value from gST->ConOut->OutputString.
     
    167167/**
    168168  File style interface for StdIn (Write).
    169  
     169
    170170  @param[in] This            Ignored.
    171171  @param[in, out] BufferSize Ignored.
    172172  @param[in] Buffer          Ignored.
    173  
     173
    174174  @retval EFI_UNSUPPORTED
    175175**/
     
    189189
    190190  Writes error to the error output.
    191  
     191
    192192  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    193193  @param[in, out] BufferSize   Size in bytes of Buffer.
    194194  @param[in] Buffer            The pointer to the buffer to write.
    195  
     195
    196196  @return A return value from gST->StdErr->OutputString.
    197197**/
     
    209209/**
    210210  File style interface for console StdOut (Read).
    211  
     211
    212212  @param[in] This              Ignored.
    213213  @param[in, out] BufferSize   Ignored.
    214214  @param[out] Buffer           Ignored.
    215  
     215
    216216  @retval EFI_UNSUPPORTED
    217217**/
     
    229229/**
    230230  File style interface for console StdErr (Read).
    231  
     231
    232232  @param[in] This              Ignored.
    233233  @param[in, out] BufferSize   Ignored.
    234234  @param[out] Buffer           Ignored.
    235  
     235
    236236  @retval EFI_UNSUPPORTED Always.
    237237**/
     
    249249/**
    250250  File style interface for NUL file (Read).
    251  
     251
    252252  @param[in] This              Ignored.
    253253  @param[in, out] BufferSize   Poiner to 0 upon return.
    254254  @param[out] Buffer           Ignored.
    255  
     255
    256256  @retval EFI_SUCCESS Always.
    257257**/
     
    270270/**
    271271  File style interface for NUL file (Write).
    272  
     272
    273273  @param[in] This              Ignored.
    274274  @param[in, out] BufferSize   Ignored.
    275275  @param[in] Buffer            Ignored.
    276  
     276
    277277  @retval EFI_SUCCESS
    278278**/
     
    940940
    941941  Frees the memory for this object.
    942  
     942
    943943  @param[in] This       The pointer to the EFI_FILE_PROTOCOL object.
    944  
     944
    945945  @retval EFI_SUCCESS
    946946**/
     
    956956
    957957  //
    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
    960960  // keep this.  So, before closing, strip the trailing '\r\n' from the variable
    961961  // if it exists.
     
    969969    if (NewBuffer == NULL) {
    970970      return EFI_OUT_OF_RESOURCES;
    971     } 
     971    }
    972972    Status = SHELL_GET_ENVIRONMENT_VARIABLE(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, &NewSize, NewBuffer);
    973973  }
    974  
     974
    975975  if (!EFI_ERROR(Status) && NewBuffer != NULL) {
    976    
     976
    977977    if (StrSize(NewBuffer) > 6)
    978978    {
    979       if ((((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 2] == CHAR_LINEFEED) 
     979      if ((((CHAR16*)NewBuffer)[(StrSize(NewBuffer)/2) - 2] == CHAR_LINEFEED)
    980980           && (((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;
    982982      }
    983    
     983
    984984      if (IsVolatileEnv(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name)) {
    985985        Status = SHELL_SET_ENVIRONMENT_VARIABLE_V(((EFI_FILE_PROTOCOL_ENVIRONMENT*)This)->Name, StrSize(NewBuffer), NewBuffer);
     
    988988      }
    989989    }
    990   } 
    991  
     990  }
     991
    992992  SHELL_FREE_NON_NULL(NewBuffer);
    993993  FreePool((EFI_FILE_PROTOCOL_ENVIRONMENT*)This);
     
    997997/**
    998998  File style interface for Environment Variable (Delete).
    999  
     999
    10001000  @param[in] This       The pointer to the EFI_FILE_PROTOCOL object.
    1001  
     1001
    10021002  @retval The return value from FileInterfaceEnvClose().
    10031003**/
     
    10141014/**
    10151015  File style interface for Environment Variable (Read).
    1016  
     1016
    10171017  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    10181018  @param[in, out] BufferSize   Size in bytes of Buffer.
    10191019  @param[out] Buffer           The pointer to the buffer to fill.
    1020  
     1020
    10211021  @retval EFI_SUCCESS   The data was read.
    10221022**/
     
    10371037/**
    10381038  File style interface for Volatile Environment Variable (Write).
    1039  
     1039
    10401040  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    10411041  @param[in, out] BufferSize   Size in bytes of Buffer.
    10421042  @param[in] Buffer            The pointer to the buffer to write.
    1043  
     1043
    10441044  @retval EFI_SUCCESS   The data was read.
    10451045**/
     
    10841084/**
    10851085  File style interface for Non Volatile Environment Variable (Write).
    1086  
     1086
    10871087  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    10881088  @param[in, out] BufferSize   Size in bytes of Buffer.
    10891089  @param[in] Buffer            The pointer to the buffer to write.
    1090  
     1090
    10911091  @retval EFI_SUCCESS   The data was read.
    10921092**/
     
    11691169  EnvFileInterface->Delete      = FileInterfaceEnvDelete;
    11701170  EnvFileInterface->Read        = FileInterfaceEnvRead;
    1171  
     1171
    11721172  CopyMem(EnvFileInterface->Name, EnvName, EnvNameSize);
    11731173
     
    13221322/**
    13231323  File style interface for Mem (SetPosition).
    1324  
     1324
    13251325  @param[in] This       The pointer to the EFI_FILE_PROTOCOL object.
    13261326  @param[out] Position  The position to set.
    1327  
     1327
    13281328  @retval EFI_SUCCESS             The position was successfully changed.
    13291329  @retval EFI_INVALID_PARAMETER   The Position was invalid.
     
    13461346/**
    13471347  File style interface for Mem (GetPosition).
    1348  
     1348
    13491349  @param[in] This       The pointer to the EFI_FILE_PROTOCOL object.
    13501350  @param[out] Position  The pointer to the position.
    1351  
     1351
    13521352  @retval EFI_SUCCESS   The position was retrieved.
    1353 **/ 
     1353**/
    13541354EFI_STATUS
    13551355EFIAPI
     
    13651365/**
    13661366  File style interface for Mem (Write).
    1367  
     1367
    13681368  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    13691369  @param[in, out] BufferSize   Size in bytes of Buffer.
    13701370  @param[in] Buffer            The pointer to the buffer to write.
    1371  
     1371
    13721372  @retval EFI_OUT_OF_RESOURCES The operation failed due to lack of resources.
    13731373  @retval EFI_SUCCESS          The data was written.
     
    14151415/**
    14161416  File style interface for Mem (Read).
    1417  
     1417
    14181418  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    14191419  @param[in, out] BufferSize   Size in bytes of Buffer.
    14201420  @param[in] Buffer            The pointer to the buffer to fill.
    1421  
     1421
    14221422  @retval EFI_SUCCESS   The data was read.
    14231423**/
     
    14421442
    14431443  Frees all memory associated with this object.
    1444  
     1444
    14451445  @param[in] This       The pointer to the EFI_FILE_PROTOCOL object.
    1446  
     1446
    14471447  @retval EFI_SUCCESS   The 'file' was closed.
    1448 **/ 
     1448**/
    14491449EFI_STATUS
    14501450EFIAPI
     
    15271527  @param  This            Protocol instance pointer.
    15281528  @param  Position        Byte position from the start of the file.
    1529                          
     1529
    15301530  @retval EFI_SUCCESS     Data was written.
    15311531  @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open.
     
    15471547  @param  This            Protocol instance pointer.
    15481548  @param  Position        Byte position from the start of the file.
    1549                          
     1549
    15501550  @retval EFI_SUCCESS     Data was written.
    15511551  @retval EFI_UNSUPPORTED Seek request for non-zero is not valid on open..
     
    17231723
    17241724  @param  This                     Protocol instance pointer.
    1725                                    
     1725
    17261726  @retval EFI_SUCCESS              The device was opened.
    17271727  @retval EFI_WARN_DELETE_FAILURE  The handle was closed but the file was not deleted.
     
    17421742/**
    17431743  File style interface for File (Close).
    1744  
     1744
    17451745  @param[in] This       The pointer to the EFI_FILE_PROTOCOL object.
    1746  
     1746
    17471747  @retval EFI_SUCCESS   The file was closed.
    17481748**/
     
    17621762  File style interface for File (Write).
    17631763
    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
    17651765  AsciiSPrint before writing.
    1766  
     1766
    17671767  @param[in] This              The pointer to the EFI_FILE_PROTOCOL object.
    17681768  @param[in, out] BufferSize   Size in bytes of Buffer.
    17691769  @param[in] Buffer            The pointer to the buffer to write.
    1770  
     1770
    17711771  @retval EFI_SUCCESS   The data was written.
    17721772**/
     
    18051805  This will create a new EFI_FILE_PROTOCOL identical to the Templace
    18061806  except that the new one has Unicode and Ascii knowledge.
    1807  
     1807
    18081808  @param[in] Template   A pointer to the EFI_FILE_PROTOCOL object.
    18091809  @param[in] Unicode    TRUE for UCS-2, FALSE for ASCII.
    1810  
     1810
    18111811  @return a new EFI_FILE_PROTOCOL object to be used instead of the template.
    18121812**/
  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/Shell.c

    r58459 r58466  
    102102
    103103/**
    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
    105105  the string was not escaped (^ character) per the shell specification.
    106106
     
    159159{
    160160  CONST CHAR16    *Walker;
    161  
     161
    162162  Walker = NULL;
    163163
     
    165165  ASSERT (EndPercent != NULL);
    166166  ASSERT (BeginPercent < EndPercent);
    167  
     167
    168168  if ((BeginPercent + 1) == EndPercent) {
    169169    return FALSE;
     
    212212  TempSpot      = FindFirstCharacter(CmdLine, L"|", L'^');
    213213
    214   if (FirstQuote == NULL    || 
    215       TempSpot == NULL      || 
    216       TempSpot == CHAR_NULL || 
     214  if (FirstQuote == NULL    ||
     215      TempSpot == NULL      ||
     216      TempSpot == CHAR_NULL ||
    217217      FirstQuote > TempSpot
    218218      ) {
     
    223223    if (FirstQuote == NULL || FirstQuote > TempSpot) {
    224224      break;
    225     }   
     225    }
    226226    SecondQuote = FindNextInstance (FirstQuote + 1, L"\"", TRUE);
    227227    if (SecondQuote == NULL) {
     
    235235      TempSpot = FindFirstCharacter(TempSpot + 1, L"|", L'^');
    236236      continue;
    237     } 
    238   }
    239  
     237    }
     238  }
     239
    240240  return (BOOLEAN) ((TempSpot != NULL) && (*TempSpot != CHAR_NULL));
    241241}
    242242
    243243/**
    244   Function to start monitoring for CTRL-S using SimpleTextInputEx.  This 
     244  Function to start monitoring for CTRL-S using SimpleTextInputEx.  This
    245245  feature's enabled state was not known when the shell initially launched.
    246246
     
    267267  if (EFI_ERROR(Status)) {
    268268    ShellPrintHiiEx(
    269       -1, 
    270       -1, 
     269      -1,
     270      -1,
    271271      NULL,
    272272      STRING_TOKEN (STR_SHELL_NO_IN_EX),
     
    285285    NotificationFunction,
    286286    &ShellInfoObject.CtrlSNotifyHandle1);
    287  
     287
    288288  KeyData.KeyState.KeyShiftState  = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
    289289  if (!EFI_ERROR(Status)) {
     
    303303      NotificationFunction,
    304304      &ShellInfoObject.CtrlSNotifyHandle3);
    305   } 
     305  }
    306306  KeyData.KeyState.KeyShiftState  = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
    307307  if (!EFI_ERROR(Status)) {
     
    13741374      continue;
    13751375    }
    1376    
     1376
    13771377    if (FirstQuote == NULL || SecondPercent < FirstQuote) {
    13781378      if (IsValidEnvironmentVariableName(FirstPercent, SecondPercent)) {
     
    15151515  ShellCopySearchAndReplace(NewCommandLine1, NewCommandLine2, NewSize, L"^%", L"%", TRUE, FALSE);
    15161516  StrnCpy(NewCommandLine1, NewCommandLine2, NewSize/sizeof(CHAR16)-1);
    1517  
     1517
    15181518  FreePool(NewCommandLine2);
    15191519  FreePool(ItemTemp);
     
    16331633
    16341634/**
    1635   Take the original command line, substitute any variables, free 
     1635  Take the original command line, substitute any variables, free
    16361636  the original string, return the modified copy.
    16371637
     
    16581658
    16591659/**
    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
    16611661  the original string, return the modified copy.
    16621662
     
    17181718  SHELL_FREE_NON_NULL(*CmdLine);
    17191719  SHELL_FREE_NON_NULL(CommandName);
    1720  
     1720
    17211721  //
    17221722  // re-assign the passed in double pointer to point to our newly allocated buffer
     
    17311731
    17321732  @param[in] CmdName  pointer to the command line to update.
    1733  
     1733
    17341734  @retval Internal_Command    The name is an internal command.
    17351735  @retval File_Sys_Change     the name is a file system change.
     
    17601760  //
    17611761  if (CmdName[(StrLen(CmdName)-1)] == L':') {
    1762     if ( StrStr(CmdName, L" ") != NULL 
     1762    if ( StrStr(CmdName, L" ") != NULL
    17631763      || StrLen(StrStr(CmdName, L":")) > 1
    17641764      ) {
     
    17901790    return (Efi_Application);
    17911791  }
    1792  
     1792
    17931793  SHELL_FREE_NON_NULL(FileWithPath);
    17941794  //
     
    18071807  @retval EFI_NOT_FOUND         The operation type is unknown or invalid.
    18081808**/
    1809 EFI_STATUS 
     1809EFI_STATUS
    18101810EFIAPI
    18111811IsValidSplit(
     
    19591959  //
    19601960  ASSERT(CmdLine[(StrLen(CmdLine)-1)] == L':' && StrStr(CmdLine, L" ") == NULL);
    1961  
     1961
    19621962  //
    19631963  // Call the protocol API to do the work
     
    21072107
    21082108  This API will upadate the shell's environment since these commands are libraries.
    2109  
     2109
    21102110  @param[in] CmdLine          the command line to run.
    21112111  @param[in] FirstParameter   the first parameter on the command line
     
    21292129  BOOLEAN                   LastError;
    21302130  CHAR16                    *Walker;
    2131   CHAR16                    *NewCmdLine; 
     2131  CHAR16                    *NewCmdLine;
    21322132
    21332133  NewCmdLine = AllocateCopyPool (StrSize (CmdLine), CmdLine);
     
    23892389  Function will process and run a command line.
    23902390
    2391   This will determine if the command line represents an internal shell 
     2391  This will determine if the command line represents an internal shell
    23922392  command or dispatch an external application.
    23932393
     
    24632463    SHELL_FREE_NON_NULL(CleanOriginal);
    24642464    return (Status);
    2465   } 
     2465  }
    24662466
    24672467  //
     
    24992499    SetLastError(SHELL_NOT_FOUND);
    25002500  }
    2501  
     2501
    25022502  SHELL_FREE_NON_NULL(CleanOriginal);
    25032503  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 to text/plain;encoding=UTF-16LE
  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellEnvVar.c

    r58459 r58466  
    139139    return (EFI_INVALID_PARAMETER);
    140140  }
    141  
     141
    142142  Status = EFI_SUCCESS;
    143  
     143
    144144  ValBufferSize = INIT_DATA_BUFFER_SIZE;
    145145  NameBufferSize = INIT_NAME_BUFFER_SIZE;
     
    167167      Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
    168168    }
    169    
     169
    170170    if (!EFI_ERROR(Status) && CompareGuid(&Guid, &gShellVariableGuid)){
    171171      VarList = AllocateZeroPool(sizeof(ENV_VAR_LIST));
     
    190190            break;
    191191          }
    192          
     192
    193193          ValSize = ValBufferSize;
    194194          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  
    144144  // Remove any remaining escape characters in the string
    145145  //
    146   for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL) 
    147     ; *NextDelim != CHAR_NULL 
     146  for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL)
     147    ; *NextDelim != CHAR_NULL
    148148    ; NextDelim = FindFirstCharacter(NextDelim, L"\"^", CHAR_NULL)
    149149    ) {
     
    174174  delimited and quote surrounded parameter definition.
    175175
    176   All special character processing (alias, environment variable, redirection, 
     176  All special character processing (alias, environment variable, redirection,
    177177  etc... must be complete before calling this API.
    178178
     
    483483  gEfiShellProtocol->SetFilePosition(Handle, OriginalFilePosition);
    484484  gEfiShellProtocol->CloseFile(Handle);
    485   return (Status); 
     485  return (Status);
    486486}
    487487
     
    562562    if ((TempLocation = StrStr(Copy , L"\"")) != NULL) {
    563563      TempLocation[0] = CHAR_NULL;
    564     }   
     564    }
    565565  } else {
    566566    Copy = FileName;
     
    570570    if ((TempLocation = StrStr(Copy , L" ")) != NULL) {
    571571      TempLocation[0] = CHAR_NULL;
    572     }   
     572    }
    573573  }
    574574
     
    603603    if ((TempLocation = StrStr(Copy , L"%")) != NULL) {
    604604      TempLocation[0] = CHAR_NULL;
    605     }   
     605    }
    606606  }
    607607
     
    612612  Remove the unicode file tag from the begining of the file buffer since that will not be
    613613  used by StdIn.
    614  
     614
    615615  @param[in]  Handle    Pointer to the handle of the file to be processed.
    616  
     616
    617617  @retval EFI_SUCCESS   The unicode file tag has been moved successfully.
    618618**/
     
    820820      Status = EFI_NOT_FOUND;
    821821    }
    822   } 
     822  }
    823823  if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >> ")) != NULL) {
    824824    FirstLocation = MIN(CommandLineWalker, FirstLocation);
     
    847847      Status = EFI_NOT_FOUND;
    848848    }
    849   } 
     849  }
    850850  if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" 1>a ")) != NULL) {
    851851    FirstLocation = MIN(CommandLineWalker, FirstLocation);
     
    861861      Status = EFI_NOT_FOUND;
    862862    }
    863   } 
     863  }
    864864  if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >a ")) != NULL) {
    865865    FirstLocation = MIN(CommandLineWalker, FirstLocation);
     
    10891089      // Cant redirect during a reconnect operation.
    10901090      //
    1091       ||(StrStr(NewCommandLine, L"connect -r") != NULL 
     1091      ||(StrStr(NewCommandLine, L"connect -r") != NULL
    10921092         && (StdOutVarName != NULL || StdOutFileName != NULL || StdErrFileName != NULL || StdErrVarName != NULL))
    10931093      //
     
    12951295  SPLIT_LIST        *Split;
    12961296
    1297   if (ShellParameters == NULL 
     1297  if (ShellParameters == NULL
    12981298    ||OldStdIn        == NULL
    12991299    ||OldStdOut       == NULL
  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellProtocol.c

    r58459 r58466  
    11721172**/
    11731173EFI_STATUS
    1174 EFIAPI 
     1174EFIAPI
    11751175EfiShellRegisterGuidName(
    11761176  IN CONST EFI_GUID *Guid,
     
    14021402                                environment variable name and y is the value. If this
    14031403                                is NULL, then the current shell environment is used.
    1404                            
     1404
    14051405  @param[out] StartImageStatus  Returned status from gBS->StartImage.
    14061406
     
    14401440
    14411441  NewHandle = NULL;
    1442  
     1442
    14431443  NewCmdLine = AllocateCopyPool (StrSize (CommandLine), CommandLine);
    14441444  if (NewCmdLine == NULL) {
     
    20472047**/
    20482048EFI_STATUS
    2049 EFIAPI 
     2049EFIAPI
    20502050EfiShellGetGuidFromName(
    20512051  IN  CONST CHAR16   *GuidName,
     
    20592059    return (EFI_INVALID_PARAMETER);
    20602060  }
    2061  
     2061
    20622062  Status = GetGuidFromStringName(GuidName, NULL, &NewGuid);
    20632063
     
    20872087**/
    20882088EFI_STATUS
    2089 EFIAPI 
     2089EFIAPI
    20902090EfiShellGetGuidName(
    20912091  IN  CONST EFI_GUID *Guid,
     
    25632563**/
    25642564CONST CHAR16 *
    2565 EFIAPI 
     2565EFIAPI
    25662566EfiShellGetEnvEx(
    25672567  IN  CONST CHAR16 *Name,
     
    31053105  )
    31063106{
    3107  
     3107
    31083108  EFI_STATUS        Status;
    31093109  EFI_GUID          Guid;
     
    31403140        break;
    31413141      }
    3142      
     3142
    31433143      NameSize = NameBufferSize;
    31443144      Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
    31453145    }
    3146    
     3146
    31473147    if (EFI_ERROR (Status)) {
    31483148      SHELL_FREE_NON_NULL(RetVal);
     
    31503150      break;
    31513151    }
    3152    
     3152
    31533153    if (CompareGuid(&Guid, &gShellAliasGuid)){
    31543154      ASSERT((RetVal == NULL && RetSize == 0) || (RetVal != NULL));
     
    31653165  Convert a null-terminated unicode string, in-place, to all lowercase.
    31663166  Then return it.
    3167  
     3167
    31683168  @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.
    31713171**/
    31723172CHAR16 *
     
    36283628        (KeyData->KeyState.KeyShiftState == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState  == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))) ||
    36293629      (KeyData->Key.UnicodeChar == 3)
    3630       ){ 
     3630      ){
    36313631    if (ShellInfoObject.NewEfiShellProtocol->ExecutionBreak == NULL) {
    36323632      return (EFI_UNSUPPORTED);
     
    36353635  } else if  ((KeyData->Key.UnicodeChar == L's') &&
    36363636              (KeyData->KeyState.KeyShiftState  == (EFI_SHIFT_STATE_VALID|EFI_LEFT_CONTROL_PRESSED) || KeyData->KeyState.KeyShiftState  == (EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED))
    3637               ){ 
     3637              ){
    36383638    ShellInfoObject.HaltOutput = TRUE;
    36393639  }
     
    36423642
    36433643/**
    3644   Function to start monitoring for CTRL-C using SimpleTextInputEx.  This 
     3644  Function to start monitoring for CTRL-C using SimpleTextInputEx.  This
    36453645  feature's enabled state was not known when the shell initially launched.
    36463646
     
    36673667  if (EFI_ERROR(Status)) {
    36683668    ShellPrintHiiEx(
    3669       -1, 
    3670       -1, 
     3669      -1,
     3670      -1,
    36713671      NULL,
    36723672      STRING_TOKEN (STR_SHELL_NO_IN_EX),
     
    36893689    NotificationFunction,
    36903690    &ShellInfoObject.CtrlCNotifyHandle1);
    3691  
     3691
    36923692  KeyData.KeyState.KeyShiftState  = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED;
    36933693  if (!EFI_ERROR(Status)) {
  • trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/ShellProtocol.h

    r58459 r58466  
    3737  This must be removed via calling CleanUpShellProtocol().
    3838
    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
    4040  to install.
    4141
     
    5050
    5151/**
    52   Opposite of CreatePopulateInstallShellProtocol. 
     52  Opposite of CreatePopulateInstallShellProtocol.
    5353
    5454  Free all memory and restore the system to the state it was in before calling
     
    915915
    916916/**
    917   Function to start monitoring for CTRL-C using SimpleTextInputEx.  This 
     917  Function to start monitoring for CTRL-C using SimpleTextInputEx.  This
    918918  feature's enabled state was not known when the shell initially launched.
    919919
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette