VirtualBox

Changeset 82508 in vbox for trunk/src/VBox


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()

Location:
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxFswParam.h

    r76553 r82508  
    5454# include <Protocol/ComponentName.h>
    5555
     56# include <Guid/VBoxFsBlessedFileInfo.h> /* For HFS blessed file support. */
     57
    5658# define BS gBS
    5759# define PROTO_NAME(x) gEfi ## x ## Guid
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxFsDxe/VBoxHfs.inf

    r80721 r82508  
    6464  gEfiFileSystemInfoGuid
    6565  gEfiFileSystemVolumeLabelInfoIdGuid
     66  gVBoxFsBlessedFileInfoGuid
    6667
    6768[Protocols]
  • 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;
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxPkg.dec

    r80721 r82508  
    3939#        gEfiFlashMapHobGuid           = { 0xb091e7d2, 0x5a0, 0x4198, {0x94, 0xf0, 0x74, 0xb7, 0xb8, 0xc5, 0x54, 0x59 }}
    4040        gVBoxVgaPkgTokenSpaceGuid = { 0xa3a8ce56, 0x4a07, 0x441f, {0xa3, 0xf5, 0x6f, 0x53, 0xdb, 0x9c, 0xb7, 0xd8}}
     41        gVBoxFsBlessedFileInfoGuid = { 0xcc49fefd, 0x41b7, 0x473f, {0x98, 0x23, 0x0e, 0x8e, 0xbf, 0x35, 0x67, 0x7d } }
    4142
    4243#
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