From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 146492242383C for ; Thu, 1 Mar 2018 00:11:03 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2018 00:17:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,407,1515484800"; d="scan'208";a="179015854" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga004.jf.intel.com with ESMTP; 01 Mar 2018 00:17:10 -0800 From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Thu, 1 Mar 2018 16:17:07 +0800 Message-Id: <1519892227-12196-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: update DNS_DEVICE_PATH/URI_DEVICE_PATH definition X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 08:11:04 -0000 Update this two definition to align with MdePkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- 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.
+Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
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