MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / PrintFvInfo

Function PrintFvInfo

BaseTools/Source/C/VolInfo/VolInfo.c:445–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443
444
445static
446EFI_STATUS
447PrintFvInfo (
448 IN VOID *Fv,
449 IN BOOLEAN IsChildFv
450 )
451/*++
452
453Routine Description:
454
455 GC_TODO: Add function description
456
457Arguments:
458
459 Fv - Firmware Volume to print information about
460 IsChildFv - Flag specifies whether the input FV is a child FV.
461
462Returns:
463
464 EFI_STATUS
465
466--*/
467{
468 EFI_STATUS Status;
469 UINTN NumberOfFiles;
470 BOOLEAN ErasePolarity;
471 UINTN FvSize;
472 EFI_FFS_FILE_HEADER *CurrentFile;
473 UINTN Key;
474
475 Status = FvBufGetSize (Fv, &FvSize);
476
477 NumberOfFiles = 0;
478 ErasePolarity =
479 (((EFI_FIRMWARE_VOLUME_HEADER*)Fv)->Attributes & EFI_FVB2_ERASE_POLARITY) ?
480 TRUE : FALSE;
481
482 //
483 // Get the first file
484 //
485 Key = 0;
486 Status = FvBufFindNextFile (Fv, &Key, (VOID **) &CurrentFile);
487 if (EFI_ERROR (Status)) {
488 Error (NULL, 0, 0003, "error parsing FV image", "cannot find the first file in the FV image");
489 return GetUtilityStatus ();
490 }
491 //
492 // Display information about files found
493 //
494 while (CurrentFile != NULL) {
495 //
496 // Increment the number of files counter
497 //
498 NumberOfFiles++;
499
500 //
501 // Display info about this file
502 //

Callers 2

mainFunction · 0.85
ParseSectionFunction · 0.85

Calls 6

FvBufGetSizeFunction · 0.85
FvBufFindNextFileFunction · 0.85
GetUtilityStatusFunction · 0.85
PrintFileInfoFunction · 0.85
printfFunction · 0.85
ErrorFunction · 0.50

Tested by

no test coverage detected