public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Subject: [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition
Date: Thu,  1 Mar 2018 16:17:07 +0800	[thread overview]
Message-ID: <1519892227-12196-1-git-send-email-yonghong.zhu@intel.com> (raw)

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



             reply	other threads:[~2018-03-01  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01  8:17 Yonghong Zhu [this message]
2018-03-01 11:54 ` [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519892227-12196-1-git-send-email-yonghong.zhu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox