acpi-build: Fix hint messages
cover acpi-build: Fix hint messages
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'.
Greg Kurz (3):
hw/i386: Add \n to hint message hw/loongarch: Add \n to hint message hw/arm: Add \n to hint message
hw/arm/virt-acpi-build.c | 2 +- hw/i386/acpi-build.c | 4 ++-- hw/loongarch/acpi-build.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/3 hw/i386: Add `\n` to hint message
error_fprintf() doesn't add newlines.
--- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/i386/acpi-build.c +2 -2
@@ -2697,7 +2697,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, legacy_table_size);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }g_array_set_size (tables_blob, legacy_table_size); }else {
@@ -2709,7 +2709,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }acpi_align_size (tables_blob,ACPI_BUILD_TABLE_SIZE ); }
Signature · 1 line
2.43.0
Re: [PATCH 1/3] hw/i386: Add `\n` to hint message
Quoted 5 lines · Greg Kurz
error_fprintf()doesn't add newlines.
^^^^^^^^^^^^^^^^^
Should be error_printf(). Ditto for other patches.
Quoted 31 lines
Signed-off-by Greg Kurz <[email protected]>---
hw/i386/acpi-build.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)hw/i386/acpi-build.c +2
-2@@ -2697,7 +2697,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, legacy_table_size);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }g_array_set_size (tables_blob, legacy_table_size); }else {@@ -2709,7 +2709,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }acpi_align_size (tables_blob,ACPI_BUILD_TABLE_SIZE ); }Signature · 1 line
2.43.0
Re: [PATCH 1/3] hw/i386: Add `\n` to hint message
Quoted 10 lines · On Tue, 30 Jan 2024 21:43:27 +0530 Ani Sinha <[email protected]> wrote:
Quoted 5 lines · Greg Kurz
error_fprintf()doesn't add newlines.^^^^^^^^^^^^^^^^^
Should be
error_printf(). Ditto for other patches.
Thanks. Posted a v2.
Quoted 32 lines
Quoted 31 lines
Signed-off-by Greg Kurz <[email protected]>---
hw/i386/acpi-build.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)hw/i386/acpi-build.c +2
-2@@ -2697,7 +2697,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, legacy_table_size);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }g_array_set_size (tables_blob, legacy_table_size); }else {@@ -2709,7 +2709,7 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }acpi_align_size (tables_blob,ACPI_BUILD_TABLE_SIZE ); }Signature · 1 line
2.43.0
Signature · 1 line
Greg
PATCH 2/3 hw/loongarch: Add `\n` to hint message
In reply to Greg Kurzerror_fprintf() doesn't add newlines.
--- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/loongarch/acpi-build.c +1 -1
@@ -509,7 +509,7 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine)" migration may not work" , tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }acpi_align_size (tables->linker->cmd_blob,ACPI_BUILD_ALIGN_SIZE );
Signature · 1 line
2.43.0
PATCH 3/3 hw/arm: Add `\n` to hint message
In reply to Greg Kurzerror_fprintf() doesn't add newlines.
--- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +1 -1
@@ -1008,7 +1008,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)" migration may not work" , tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2);error_printf ("Try removing CPUs, NUMA nodes, memory slots" -" or PCI bridges." ); +" or PCI bridges.\n" ); }acpi_align_size (tables_blob,ACPI_BUILD_TABLE_SIZE );
Signature · 1 line
2.43.0