BaseTools/Source/C/Include/Protocol/DevicePath.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
Update this two definition to align with MdePkg.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
BaseTools/Source/C/Include/Protocol/DevicePath.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h
index a5d8eea..68bb37e 100644
--- a/BaseTools/Source/C/Include/Protocol/DevicePath.h
+++ b/BaseTools/Source/C/Include/Protocol/DevicePath.h
@@ -3,11 +3,11 @@
The device path represents a programmatic path to a device,
from a software point of view. The path must persist from boot to boot, so
it can not contain things like PCI bus numbers that change from boot to boot.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
@@ -36,10 +36,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
#pragma pack(1)
+#if defined(_MSC_EXTENSIONS)
+//
+// Disable warning when last field of data structure is a zero sized array.
+//
+#pragma warning ( disable : 4200 )
+#endif
+
/**
This protocol can be used on any device handle to obtain generic path/location
information concerning the physical device or logical device. If the handle does
not logically map to a physical device, the handle may not necessarily support
the device path protocol. The device path describes the location of the device
@@ -828,11 +835,11 @@ typedef struct {
///
UINT8 IsIPv6;
///
/// Instance of the DNS server address.
///
- EFI_IP_ADDRESS DnsServerIp[1024];
+ EFI_IP_ADDRESS DnsServerIp[];
} DNS_DEVICE_PATH;
///
/// Uniform Resource Identifiers (URI) Device Path SubType
///
@@ -840,11 +847,11 @@ typedef struct {
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
///
/// Instance of the URI pursuant to RFC 3986.
///
- CHAR8 Uri[1024];
+ CHAR8 Uri[];
} URI_DEVICE_PATH;
///
/// Universal Flash Storage (UFS) Device Path SubType.
///
--
2.6.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Liming Gao <liming.gao@intel.com> > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yonghong Zhu > Sent: Thursday, March 1, 2018 4:17 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition > > Update this two definition to align with MdePkg. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> > --- > BaseTools/Source/C/Include/Protocol/DevicePath.h | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h > index a5d8eea..68bb37e 100644 > --- a/BaseTools/Source/C/Include/Protocol/DevicePath.h > +++ b/BaseTools/Source/C/Include/Protocol/DevicePath.h > @@ -3,11 +3,11 @@ > > The device path represents a programmatic path to a device, > from a software point of view. The path must persist from boot to boot, so > it can not contain things like PCI bus numbers that change from boot to boot. > > -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> > +Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR> > This program and the accompanying materials are licensed and made available under > the terms and conditions of the BSD License that accompanies this distribution. > The full text of the license may be found at > http://opensource.org/licenses/bsd-license.php. > > @@ -36,10 +36,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > /// > #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID > > #pragma pack(1) > > +#if defined(_MSC_EXTENSIONS) > +// > +// Disable warning when last field of data structure is a zero sized array. > +// > +#pragma warning ( disable : 4200 ) > +#endif > + > /** > This protocol can be used on any device handle to obtain generic path/location > information concerning the physical device or logical device. If the handle does > not logically map to a physical device, the handle may not necessarily support > the device path protocol. The device path describes the location of the device > @@ -828,11 +835,11 @@ typedef struct { > /// > UINT8 IsIPv6; > /// > /// Instance of the DNS server address. > /// > - EFI_IP_ADDRESS DnsServerIp[1024]; > + EFI_IP_ADDRESS DnsServerIp[]; > } DNS_DEVICE_PATH; > > /// > /// Uniform Resource Identifiers (URI) Device Path SubType > /// > @@ -840,11 +847,11 @@ typedef struct { > typedef struct { > EFI_DEVICE_PATH_PROTOCOL Header; > /// > /// Instance of the URI pursuant to RFC 3986. > /// > - CHAR8 Uri[1024]; > + CHAR8 Uri[]; > } URI_DEVICE_PATH; > > /// > /// Universal Flash Storage (UFS) Device Path SubType. > /// > -- > 2.6.1.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.