回复: [edk2-devel][PATCH] BaseTools: Increase the DevicePath length for support more PCD value.


gaoliming
 

Xiaolu:
Why choose 4096? Is it enough?

Thanks
Liming

-----邮件原件-----
发件人: Xiaolu.Jiang <xiaolu.jiang@intel.com>
发送时间: 2021年11月6日 11:51
收件人: devel@edk2.groups.io
抄送: Xiaolu.Jiang <xiaolu.jiang@intel.com>; Bob Feng
<bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Yuwei
Chen <yuwei.chen@intel.com>
主题: [edk2-devel][PATCH] BaseTools: Increase the DevicePath length for
support more PCD value.

Currently the PCD Value only support 13 Guid,When use more 13 pcd will
cause the build tool fail,
Need increase the DevicePath length to support more value.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3718

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>

Signed-off-by: Xiaolu Jiang <xiaolu.jiang@intel.com>
---
BaseTools/Source/C/DevicePath/DevicePath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/DevicePath/DevicePath.c
b/BaseTools/Source/C/DevicePath/DevicePath.c
index c4d224ed61..ef493f5506 100644
--- a/BaseTools/Source/C/DevicePath/DevicePath.c
+++ b/BaseTools/Source/C/DevicePath/DevicePath.c
@@ -170,7 +170,7 @@ int main(int argc, CHAR8 *argv[])
fprintf(stderr, "Invalid option value, Device Path can't be NULL");

return STATUS_ERROR;

}

- Str16 = (CHAR16 *)malloc(1024);

+ Str16 = (CHAR16 *)malloc(4096);

if (Str16 == NULL) {

fprintf(stderr, "Resource, memory cannot be allocated");

return STATUS_ERROR;

--
2.30.2.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.