public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition
@ 2018-03-01  8:17 Yonghong Zhu
  2018-03-01 11:54 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Yonghong Zhu @ 2018-03-01  8:17 UTC (permalink / raw)
  To: edk2-devel

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition
  2018-03-01  8:17 [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition Yonghong Zhu
@ 2018-03-01 11:54 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2018-03-01 11:54 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-01 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01  8:17 [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition Yonghong Zhu
2018-03-01 11:54 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox