VirtualBox

Ignore:
Timestamp:
Aug 12, 2020 4:09:12 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139865
Message:

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

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

  • trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Application/Shell/ShellManParser.c

    r80721 r85718  
    180180
    181181/**
    182   parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
    183   detailed help for any sub section specified in the comma seperated list of
     182  Parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
     183  detailed help for any sub section specified in the comma separated list of
    184184  sections provided.  If the end of the file or a .TH section is found then
    185185  return.
    186186
    187   Upon a sucessful return the caller is responsible to free the memory in *HelpText
     187  Upon a successful return the caller is responsible to free the memory in *HelpText
    188188
    189189  @param[in] Handle             FileHandle to read from
     
    194194
    195195  @retval EFI_OUT_OF_RESOURCES  a memory allocation failed.
    196   @retval EFI_SUCCESS           the section was found and its description sotred in
    197                                 an alloceted buffer.
     196  @retval EFI_SUCCESS           the section was found and its description stored in
     197                                an allocated buffer.
    198198**/
    199199EFI_STATUS
     
    297297  Parses a line from a MAN file to see if it is the Title Header. If it is, then
    298298  if the "Brief Description" is desired, allocate a buffer for it and return a
    299   copy. Upon a sucessful return the caller is responsible to free the memory in
     299  copy. Upon a successful return the caller is responsible to free the memory in
    300300  *BriefDesc
    301301
    302302  Uses a simple state machine that allows "unlimited" whitespace before and after the
    303   ".TH", compares Command and the MAN file commnd name without respect to case, and
     303  ".TH", compares Command and the MAN file command name without respect to case, and
    304304  allows "unlimited" whitespace and '0' and '1' characters before the Short Description.
    305305  The PCRE regex describing this functionality is: ^\s*\.TH\s+(\S)\s[\s01]*(.*)$
     
    422422
    423423/**
    424   parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
     424  Parses through the MAN file specified by SHELL_FILE_HANDLE and returns the
    425425  "Brief Description" for the .TH section as specified by Command.  If the
    426426  command section is not found return EFI_NOT_FOUND.
    427427
    428   Upon a sucessful return the caller is responsible to free the memory in *BriefDesc
     428  Upon a successful return the caller is responsible to free the memory in *BriefDesc
    429429
    430430  @param[in] Handle              FileHandle to read from
     
    513513  available will be returned.
    514514
    515   if BriefDesc is NULL, then the breif description will not be savedd seperatly,
     515  if BriefDesc is NULL, then the breif description will not be saved separately,
    516516  but placed first in the main HelpText.
    517517
     
    646646    Status      = gBS->LoadImage(FALSE, gImageHandle, DevPath, NULL, 0, &CmdFileImgHandle);
    647647    if(EFI_ERROR(Status)) {
     648      //
     649      // With EFI_SECURITY_VIOLATION retval, the Image was loaded and an ImageHandle was created
     650      // with a valid EFI_LOADED_IMAGE_PROTOCOL, but the image can not be started right now.
     651      // If the caller doesn't have the option to defer the execution of an image, we should
     652      // unload image for the EFI_SECURITY_VIOLATION to avoid the resource leak.
     653      //
     654      if (Status == EFI_SECURITY_VIOLATION) {
     655        gBS->UnloadImage (CmdFileImgHandle);
     656      }
    648657      *HelpText = NULL;
    649658      goto Done;
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