Эх сурвалжийг харах

Use EFI_FILE_SYSTEM_VOLUME_LABEL rather than EFI_FILE_SYSTEM_VOLUME_LABEL_INFO

Per https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Guid/FileSystemVolumeLabelInfo.h
the EDK2 uses EFI_FILE_SYSTEM_VOLUME_LABEL and EFI_FILE_SYSTEM_VOLUME_LABEL_ID rather
than EFI_FILE_SYSTEM_VOLUME_LABEL_INFO and EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID.

We redefine those to the proper EDK2 names, while also adding defines for compatibility.
Pete Batard 4 жил өмнө
parent
commit
2458595367
2 өөрчлөгдсөн 10 нэмэгдсэн , 4 устгасан
  1. 9 3
      inc/efiprot.h
  2. 1 1
      lib/data.c

+ 9 - 3
inc/efiprot.h

@@ -517,14 +517,20 @@ typedef struct {
 
 #define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
 
-#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID    \
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_ID    \
     { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
 
 typedef struct {
     CHAR16                  VolumeLabel[1];
-} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
+} EFI_FILE_SYSTEM_VOLUME_LABEL;
 
-#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
+#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL,VolumeLabel)
+
+//
+// For compatibility with older versions of gnu-efi
+//
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID EFI_FILE_SYSTEM_VOLUME_LABEL_ID
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO    EFI_FILE_SYSTEM_VOLUME_LABEL
 
 //
 // Load file protocol

+ 1 - 1
lib/data.c

@@ -129,7 +129,7 @@ EFI_GUID gEfiEbcProtocolGuid                        = EFI_EBC_PROTOCOL_GUID;
 
 EFI_GUID gEfiFileInfoGuid                           = EFI_FILE_INFO_ID;
 EFI_GUID gEfiFileSystemInfoGuid                     = EFI_FILE_SYSTEM_INFO_ID;
-EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid        = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID;
+EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid        = EFI_FILE_SYSTEM_VOLUME_LABEL_ID;
 
 //
 // Reference implementation public protocol IDs