]> git.pld-linux.org Git - packages/acpica.git/blame - acpica-dbtest.patch
- added verbose patch not to hide compiler command line, disable stripping on install
[packages/acpica.git] / acpica-dbtest.patch
CommitLineData
b643ab7e
JB
1On s390, GCC does not like the string initialization in this case. When
2ValueToWrite is initialized this way, GCC tries to copy the entire string
3into an ACPI_OBJECT instead of just the pointer (see the use in the call
4to memcpy()). So, move the init so GCC recognizes that ValueToWrite is
5only a pointer, and not a whole string that needs to be moved.
6
7Index: acpica-unix2-20220331/source/components/debugger/dbtest.c
8===================================================================
9--- acpica-unix2-20220331.orig/source/components/debugger/dbtest.c
10+++ acpica-unix2-20220331/source/components/debugger/dbtest.c
11@@ -719,9 +719,10 @@ AcpiDbTestStringType (
12 ACPI_OBJECT *Temp1 = NULL;
13 ACPI_OBJECT *Temp2 = NULL;
14 ACPI_OBJECT *Temp3 = NULL;
15- char *ValueToWrite = "Test String from AML Debugger";
16+ char *ValueToWrite = NULL;
17 ACPI_OBJECT WriteValue;
18 ACPI_STATUS Status;
19+ const char *TestStr = "Test String from AML Debugger";
20
21
22 /* Read the original value */
23@@ -737,6 +738,9 @@ AcpiDbTestStringType (
24
25 /* Write a new value */
26
27+ ValueToWrite = AcpiOsAllocateZeroed(strlen(TestStr)+1);
28+ strncpy(ValueToWrite, TestStr, strlen(TestStr)+1);
29+
30 WriteValue.Type = ACPI_TYPE_STRING;
31 WriteValue.String.Length = strlen (ValueToWrite);
32 WriteValue.String.Pointer = ValueToWrite;
33@@ -790,6 +794,7 @@ Exit:
34 if (Temp1) {AcpiOsFree (Temp1);}
35 if (Temp2) {AcpiOsFree (Temp2);}
36 if (Temp3) {AcpiOsFree (Temp3);}
37+ if (ValueToWrite) {AcpiOsFree (ValueToWrite);}
38 return (Status);
39 }
40
This page took 0.147866 seconds and 4 git commands to generate.