]> xenbits.xensource.com Git - ovmf.git/commitdiff
RedfishPkg: Fix compile issue on Linux
authorVu Nguyen <vunguyen@os.amperecomputing.com>
Thu, 20 May 2021 03:38:24 +0000 (10:38 +0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 May 2023 13:12:01 +0000 (13:12 +0000)
It requires a fixed size array to store the content of device path PCD.
Add the array size to solve this issue.

Signed-off-by: Minh Nguyen <minhnguyen1@os.amperecomputing.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
Reviewed-by: Abner Chang <Abner.Chang@amd.com>
RedfishPkg/Include/Pcd/RestExServiceDevicePath.h

index 91b1198297c206e261912524214f991c4af67596..b630c1e7f5f275c096f868e7000c6c35c8ec0fb0 100644 (file)
@@ -4,6 +4,7 @@
 \r
   Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
+  Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>\r
 \r
     SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -14,6 +15,8 @@
 \r
 #include <Protocol/DevicePath.h>\r
 \r
+#define MAX_DEVICE_PATH_NODE  40\r
+\r
 typedef enum {\r
   DEVICE_PATH_MATCH_MAC_NODE = 1,\r
   DEVICE_PATH_MATCH_PCI_NODE = 2,\r
@@ -32,7 +35,7 @@ typedef struct {
   //    0x03,0x0b,0x25,0x00,0x00,0x50,0x56,0xc0,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,\r
   //    0x7f,0xff,0x04,0x00}\r
   //\r
-  EFI_DEVICE_PATH_PROTOCOL    DevicePath[];\r
+  EFI_DEVICE_PATH_PROTOCOL    DevicePath[MAX_DEVICE_PATH_NODE];\r
 } REST_EX_SERVICE_DEVICE_PATH_DATA;\r
 \r
 #endif\r