| 443 | |
| 444 | |
| 445 | static |
| 446 | EFI_STATUS |
| 447 | PrintFvInfo ( |
| 448 | IN VOID *Fv, |
| 449 | IN BOOLEAN IsChildFv |
| 450 | ) |
| 451 | /*++ |
| 452 | |
| 453 | Routine Description: |
| 454 | |
| 455 | GC_TODO: Add function description |
| 456 | |
| 457 | Arguments: |
| 458 | |
| 459 | Fv - Firmware Volume to print information about |
| 460 | IsChildFv - Flag specifies whether the input FV is a child FV. |
| 461 | |
| 462 | Returns: |
| 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 | // |
no test coverage detected