From 3dc6f8693694a649a9c83f1e2746565b47683923 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Wed, 12 Jul 2017 06:57:41 -0700 Subject: Convert error_report() to warn_report() Convert all uses of error_report("warning:"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using these two commands: find ./* -type f -exec sed -i \ 's|error_report(".*warning[,:] |warn_report("|Ig' {} + Indentation fixed up manually afterwards. The test-qdev-global-props test case was manually updated to ensure that this patch passes make check (as the test cases are case sensitive). Signed-off-by: Alistair Francis Suggested-by: Thomas Huth Cc: Jeff Cody Cc: Kevin Wolf Cc: Max Reitz Cc: Ronnie Sahlberg Cc: Paolo Bonzini Cc: Peter Lieven Cc: Josh Durgin Cc: "Richard W.M. Jones" Cc: Markus Armbruster Cc: Peter Crosthwaite Cc: Richard Henderson Cc: "Aneesh Kumar K.V" Cc: Greg Kurz Cc: Rob Herring Cc: Peter Maydell Cc: Peter Chubb Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: David Gibson Cc: Alexander Graf Cc: Gerd Hoffmann Cc: Jason Wang Cc: Marcelo Tosatti Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Stefan Hajnoczi Acked-by: David Gibson Acked-by: Greg Kurz Acked-by: Cornelia Huck Reviewed-by: Stefan Hajnoczi Reviewed by: Peter Chubb Acked-by: Max Reitz Acked-by: Marcel Apfelbaum Message-Id: Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- hw/core/machine.c | 10 +++++----- hw/core/qdev-properties.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'hw/core') diff --git a/hw/core/machine.c b/hw/core/machine.c index ecb55528e8..dc431fabf5 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -741,11 +741,11 @@ static void machine_numa_finish_init(MachineState *machine) } } if (s->len && !qtest_enabled()) { - error_report("warning: CPU(s) not present in any NUMA nodes: %s", - s->str); - error_report("warning: All CPU(s) up to maxcpus should be described " - "in NUMA config, ability to start up with partial NUMA " - "mappings is obsoleted and will be removed in future"); + warn_report("CPU(s) not present in any NUMA nodes: %s", + s->str); + warn_report("All CPU(s) up to maxcpus should be described " + "in NUMA config, ability to start up with partial NUMA " + "mappings is obsoleted and will be removed in future"); } g_string_free(s, true); } diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index f11d57831b..f5983c83da 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1132,15 +1132,15 @@ int qdev_prop_check_globals(void) oc = object_class_by_name(prop->driver); oc = object_class_dynamic_cast(oc, TYPE_DEVICE); if (!oc) { - error_report("Warning: global %s.%s has invalid class name", - prop->driver, prop->property); + warn_report("global %s.%s has invalid class name", + prop->driver, prop->property); ret = 1; continue; } dc = DEVICE_CLASS(oc); if (!dc->hotpluggable && !prop->used) { - error_report("Warning: global %s.%s=%s not used", - prop->driver, prop->property, prop->value); + warn_report("global %s.%s=%s not used", + prop->driver, prop->property, prop->value); ret = 1; continue; } -- cgit v1.2.3 From 88f83f3539fdedd5f315c5fe434ffcb7a010cc73 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Wed, 12 Jul 2017 06:57:56 -0700 Subject: Convert error_report*_err() to warn_report*_err() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert all uses of error_report*_err("Warning:"... to use warn_report*_err() instead. This helps standardise on a single method of printing warnings to the user. Signed-off-by: Alistair Francis Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin" Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eduardo Habkost Reviewed-by: Markus Armbruster Message-Id: Signed-off-by: Markus Armbruster --- hw/core/qdev-properties.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/core') diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index f5983c83da..3d0bba21a2 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -1169,7 +1169,7 @@ static void qdev_prop_set_globals_for_type(DeviceState *dev, error_propagate(prop->errp, err); } else { assert(prop->user_provided); - error_reportf_err(err, "Warning: "); + warn_report_err(err); } } } -- cgit v1.2.3