diff options
author | Vu Nguyen <vunguyen@os.amperecomputing.com> | 2021-05-20 10:38:24 +0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-05-08 13:12:01 +0000 |
commit | 6eeb58ece38060be3b0f7111649a93cc8b2dca49 (patch) | |
tree | 130512a772e95feb01924e951a21c07184c0022c | |
parent | 665fca9ee76eafcc5936e5d0085ef131ada4e0e8 (diff) | |
download | edk2-6eeb58ece38060be3b0f7111649a93cc8b2dca49.tar.gz edk2-6eeb58ece38060be3b0f7111649a93cc8b2dca49.tar.bz2 edk2-6eeb58ece38060be3b0f7111649a93cc8b2dca49.zip |
RedfishPkg: Fix compile issue on Linux
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>
-rw-r--r-- | RedfishPkg/Include/Pcd/RestExServiceDevicePath.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h index 91b1198297..b630c1e7f5 100644 --- a/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h +++ b/RedfishPkg/Include/Pcd/RestExServiceDevicePath.h @@ -4,6 +4,7 @@ Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -14,6 +15,8 @@ #include <Protocol/DevicePath.h>
+#define MAX_DEVICE_PATH_NODE 40
+
typedef enum {
DEVICE_PATH_MATCH_MAC_NODE = 1,
DEVICE_PATH_MATCH_PCI_NODE = 2,
@@ -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,
// 0x7f,0xff,0x04,0x00}
//
- EFI_DEVICE_PATH_PROTOCOL DevicePath[];
+ EFI_DEVICE_PATH_PROTOCOL DevicePath[MAX_DEVICE_PATH_NODE];
} REST_EX_SERVICE_DEVICE_PATH_DATA;
#endif
|