Changeset 85718 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/ShellPkg/Application/Shell/ShellManParser.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/ShellManParser.c
r80721 r85718 180 180 181 181 /** 182 parses through the MAN file specified by SHELL_FILE_HANDLE and returns the183 detailed help for any sub section specified in the comma sep erated list of182 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 184 184 sections provided. If the end of the file or a .TH section is found then 185 185 return. 186 186 187 Upon a suc essful return the caller is responsible to free the memory in *HelpText187 Upon a successful return the caller is responsible to free the memory in *HelpText 188 188 189 189 @param[in] Handle FileHandle to read from … … 194 194 195 195 @retval EFI_OUT_OF_RESOURCES a memory allocation failed. 196 @retval EFI_SUCCESS the section was found and its description s otred in197 an alloc eted buffer.196 @retval EFI_SUCCESS the section was found and its description stored in 197 an allocated buffer. 198 198 **/ 199 199 EFI_STATUS … … 297 297 Parses a line from a MAN file to see if it is the Title Header. If it is, then 298 298 if the "Brief Description" is desired, allocate a buffer for it and return a 299 copy. Upon a suc essful return the caller is responsible to free the memory in299 copy. Upon a successful return the caller is responsible to free the memory in 300 300 *BriefDesc 301 301 302 302 Uses a simple state machine that allows "unlimited" whitespace before and after the 303 ".TH", compares Command and the MAN file comm nd name without respect to case, and303 ".TH", compares Command and the MAN file command name without respect to case, and 304 304 allows "unlimited" whitespace and '0' and '1' characters before the Short Description. 305 305 The PCRE regex describing this functionality is: ^\s*\.TH\s+(\S)\s[\s01]*(.*)$ … … 422 422 423 423 /** 424 parses through the MAN file specified by SHELL_FILE_HANDLE and returns the424 Parses through the MAN file specified by SHELL_FILE_HANDLE and returns the 425 425 "Brief Description" for the .TH section as specified by Command. If the 426 426 command section is not found return EFI_NOT_FOUND. 427 427 428 Upon a suc essful return the caller is responsible to free the memory in *BriefDesc428 Upon a successful return the caller is responsible to free the memory in *BriefDesc 429 429 430 430 @param[in] Handle FileHandle to read from … … 513 513 available will be returned. 514 514 515 if BriefDesc is NULL, then the breif description will not be saved d seperatly,515 if BriefDesc is NULL, then the breif description will not be saved separately, 516 516 but placed first in the main HelpText. 517 517 … … 646 646 Status = gBS->LoadImage(FALSE, gImageHandle, DevPath, NULL, 0, &CmdFileImgHandle); 647 647 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 } 648 657 *HelpText = NULL; 649 658 goto Done;
Note:
See TracChangeset
for help on using the changeset viewer.