[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 19/47] hw/ipmi: Replace fprintf(stderr, "*\n" wit
From: |
Alistair Francis |
Subject: |
[Qemu-devel] [PATCH v2 19/47] hw/ipmi: Replace fprintf(stderr, "*\n" with error_report() |
Date: |
Fri, 29 Sep 2017 17:15:57 -0700 |
Replace a large number of the fprintf(stderr, "*\n" calls with
error_report(). The functions were renamed with these commands and then
compiler issues where manually fixed.
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N; {s|fprintf(stderr,
"\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}'
\
{} +
find ./* -type f -exec sed -i \
'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
{} +
Some lines where then manually tweaked to pass checkpatch.
Signed-off-by: Alistair Francis <address@hidden>
---
V2:
- Split hw patch into individual directories
hw/ipmi/ipmi.c | 1 +
hw/ipmi/ipmi_bmc_extern.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ipmi/ipmi.c b/hw/ipmi/ipmi.c
index b27babd504..81c62920de 100644
--- a/hw/ipmi/ipmi.c
+++ b/hw/ipmi/ipmi.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "hw/hw.h"
#include "hw/ipmi/ipmi.h"
#include "sysemu/sysemu.h"
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
index abab3bba4f..8c0535d3dd 100644
--- a/hw/ipmi/ipmi_bmc_extern.c
+++ b/hw/ipmi/ipmi_bmc_extern.c
@@ -28,6 +28,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qemu/timer.h"
#include "chardev/char-fe.h"
@@ -194,8 +195,8 @@ static void ipmi_bmc_extern_handle_command(IPMIBmc *b,
if (ibe->outlen) {
/* We already have a command queued. Shouldn't ever happen. */
- fprintf(stderr, "IPMI KCS: Got command when not finished with the"
- " previous command\n");
+ error_report("IPMI KCS: Got command when not finished with the"
+ " previous command");
abort();
}
--
2.11.0
- Re: [Qemu-devel] [PATCH v2 14/47] hw/i2c: Replace fprintf(stderr, "*\n" with error_report(), (continued)
- [Qemu-devel] [PATCH v2 12/47] hw/dma: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 17/47] hw/input: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 16/47] hw/ide: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 21/47] hw/lm32: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 22/47] hw/m68k: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 18/47] hw/intc: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 19/47] hw/ipmi: Replace fprintf(stderr, "*\n" with error_report(),
Alistair Francis <=
- [Qemu-devel] [PATCH v2 20/47] hw/isa: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 01/47] Replace all occurances of __FUNCTION__ with __func__, Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 26/47] hw/moxie: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 24/47] hw/mips: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29
- [Qemu-devel] [PATCH v2 23/47] hw/microblaze: Replace fprintf(stderr, "*\n" with error_report(), Alistair Francis, 2017/09/29