VirtualBox

Ignore:
Timestamp:
Dec 9, 2019 12:10:54 PM (5 years ago)
Author:
vboxsync
Message:

EFI/Firmware/VBoxPkg: Add new GUID to retrieve the blessed file from HFS+ volumes through GetInfo()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/fsw_efi.c

    r77696 r82508  
    137137                                       OUT VOID *Buffer);
    138138
     139#if defined(VBOX) && (FSTYPE == hfs)
     140extern fsw_status_t fsw_hfs_get_blessed_file(void *vol, struct fsw_string *path);
     141#endif
     142
    139143/**
    140144 * Interface structure for the EFI Driver Binding protocol.
     
    983987        Status = EFI_SUCCESS;
    984988
     989#ifdef VBOX
     990    } else if (CompareGuid(InformationType, &gVBoxFsBlessedFileInfoGuid)) {
     991
     992# if FSTYPE == hfs
     993        struct fsw_string StrBlessedFile;
     994
     995        fsw_status_t rc = fsw_hfs_get_blessed_file(Volume->vol, &StrBlessedFile);
     996        if (!rc)
     997        {
     998            // check buffer size
     999            RequiredSize = SIZE_OF_VBOX_FS_BLESSED_FILE + fsw_efi_strsize(&StrBlessedFile);
     1000            if (*BufferSize < RequiredSize) {
     1001                *BufferSize = RequiredSize;
     1002                return EFI_BUFFER_TOO_SMALL;
     1003            }
     1004
     1005            // copy volume label
     1006            fsw_efi_strcpy(((VBOX_FS_BLESSED_FILE *)Buffer)->BlessedFile, &StrBlessedFile);
     1007
     1008            // prepare for return
     1009            *BufferSize = RequiredSize;
     1010            Status = EFI_SUCCESS;
     1011        }
     1012        else
     1013# endif
     1014            Status = EFI_UNSUPPORTED;
     1015#endif
     1016
    9851017    } else {
    9861018        Status = EFI_UNSUPPORTED;
Note: See TracChangeset for help on using the changeset viewer.

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