[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/8] Convert error_report() to warn_report()
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/8] Convert error_report() to warn_report() |
Date: |
Tue, 11 Jul 2017 18:51:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 2017-07-11 14:07, Alistair Francis wrote:
> 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 where changed using these two commands:
> find ./* -type f -exec sed -i \
> 's|error_report(".*warning[,:] |warn_report("|Ig' {} +
>
> Then the white space changes where manually fixed 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 <address@hidden>
> Suggested-by: Thomas Huth <address@hidden>
> Cc: Jeff Cody <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: Max Reitz <address@hidden>
> Cc: Ronnie Sahlberg <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Peter Lieven <address@hidden>
> Cc: Josh Durgin <address@hidden>
> Cc: "Richard W.M. Jones" <address@hidden>
> Cc: Markus Armbruster <address@hidden>
> Cc: Peter Crosthwaite <address@hidden>
> Cc: Richard Henderson <address@hidden>
> Cc: "Aneesh Kumar K.V" <address@hidden>
> Cc: Greg Kurz <address@hidden>
> Cc: Rob Herring <address@hidden>
> Cc: Peter Maydell <address@hidden>
> Cc: Peter Chubb <address@hidden>
> Cc: Eduardo Habkost <address@hidden>
> Cc: Marcel Apfelbaum <address@hidden>
> Cc: "Michael S. Tsirkin" <address@hidden>
> Cc: Igor Mammedov <address@hidden>
> Cc: David Gibson <address@hidden>
> Cc: Alexander Graf <address@hidden>
> Cc: Gerd Hoffmann <address@hidden>
> Cc: Jason Wang <address@hidden>
> Cc: Marcelo Tosatti <address@hidden>
> Cc: Christian Borntraeger <address@hidden>
> Cc: Cornelia Huck <address@hidden>
> Cc: Stefan Hajnoczi <address@hidden>
> Acked-by: David Gibson <address@hidden>
> Acked-by: Greg Kurz <address@hidden>
> Acked-by: Cornelia Huck <address@hidden>
> Reviewed-by: Stefan Hajnoczi <address@hidden>
> Reviewed by: Peter Chubb <address@hidden>
> Acked-by: Max Reitz <address@hidden>
> Acked-by: Marcel Apfelbaum <address@hidden>
> ---
> V3:
> - Regenerate patch to ensure no manual edits where made
> - Tighten regex matches
> V2:
> - Fix quotation issues
> - Update commit message
> - Include full command
>
> Just a note:
> We will need to do a similar thing for fprintf. There are patches on
> the list at the moment that conflict with this series (by adding
> error_report() calls that shsould be warning), so I think I'm giong to
> have to do a follow up series converting more cases. I'll cover the
> fprintf cases when I do that. There are some manual cases as
> well that don't say warning or info, but really should. They will have
> to be converted as well.
>
>
> block/backup.c | 10 +++++-----
> block/gluster.c | 4 ++--
> block/iscsi.c | 6 +++---
> block/nfs.c | 12 ++++++------
> block/rbd.c | 6 +++---
> block/ssh.c | 4 ++--
> blockdev.c | 2 +-
> cpus.c | 2 +-
> hw/9pfs/9p.c | 2 +-
> hw/arm/highbank.c | 6 +++---
> hw/arm/imx25_pdk.c | 6 +++---
> hw/arm/kzm.c | 6 +++---
> hw/core/machine.c | 10 +++++-----
> hw/core/qdev-properties.c | 8 ++++----
> hw/i386/acpi-build.c | 10 +++++-----
> hw/i386/kvm/pci-assign.c | 6 +++---
> hw/i386/pc.c | 10 +++++-----
> hw/i386/pc_piix.c | 8 ++++----
> hw/i386/pc_q35.c | 6 +++---
> hw/misc/aspeed_sdmc.c | 8 ++++----
> hw/nvram/fw_cfg.c | 2 +-
> hw/pci-host/piix.c | 2 +-
> hw/ppc/pnv.c | 6 +++---
> hw/ppc/spapr.c | 4 ++--
> hw/ppc/spapr_iommu.c | 2 +-
> hw/scsi/scsi-bus.c | 6 +++---
> hw/usb/dev-smartcard-reader.c | 4 ++--
> hw/usb/redirect.c | 2 +-
> net/tap-linux.c | 2 +-
> target/i386/cpu.c | 8 ++++----
> target/i386/kvm.c | 4 ++--
> target/s390x/cpu_models.c | 2 +-
> target/s390x/kvm.c | 2 +-
> tests/test-qdev-global-props.c | 6 +++---
> trace/control.c | 4 ++--
> vl.c | 20 ++++++++++----------
> 36 files changed, 104 insertions(+), 104 deletions(-)
>
> diff --git a/block/backup.c b/block/backup.c
> index b69184eac5..44cc2b22ab 100644
> --- a/block/backup.c
> +++ b/block/backup.c
> @@ -639,11 +639,11 @@ BlockJob *backup_job_create(const char *job_id,
> BlockDriverState *bs,
> ret = bdrv_get_info(target, &bdi);
> if (ret == -ENOTSUP && !target->backing) {
> /* Cluster size is not defined */
> - error_report("WARNING: The target block device doesn't provide "
> - "information about the block size and it doesn't have a
> "
> - "backing file. The default block size of %u bytes is "
> - "used. If the actual block size of the target exceeds "
> - "this default, the backup may be unusable",
> + warn_report("The target block device doesn't provide "
> + "information about the block size and it doesn't have a "
> + "backing file. The default block size of %u bytes is "
> + "used. If the actual block size of the target exceeds "
> + "this default, the backup may be unusable",
> BACKUP_CLUSTER_SIZE_DEFAULT);
Sorry I didn't see this before, but this line may need re-indentation as
well.
But I'm not too picky (even though maybe I should be O:-)), so my
Acked-by can stay either way.
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 0/8] Implement a warning_report function, Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 1/8] util/qemu-error: Rename error_print_loc() to be more generic, Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 2/8] error: Functions to report warnings and informational messages, Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 5/8] char-socket: Report TCP socket waiting as information, Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 4/8] hw/i386: Improve some of the warning messages, Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 3/8] Convert error_report() to warn_report(), Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 7/8] Convert error_report*_err() to warn_report*_err(), Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 6/8] error: Implement the warn and free Error functions, Alistair Francis, 2017/07/11
- [Qemu-devel] [PATCH v3 8/8] error: Add a 'error: ' prefix to error_report(), Alistair Francis, 2017/07/11
- Re: [Qemu-devel] [PATCH v3 0/8] Implement a warning_report function, no-reply, 2017/07/11