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 <alistair.fran...@xilinx.com> > Suggested-by: Thomas Huth <th...@redhat.com> > Cc: Jeff Cody <jc...@redhat.com> > Cc: Kevin Wolf <kw...@redhat.com> > Cc: Max Reitz <mre...@redhat.com> > Cc: Ronnie Sahlberg <ronniesahlb...@gmail.com> > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Peter Lieven <p...@kamp.de> > Cc: Josh Durgin <jdur...@redhat.com> > Cc: "Richard W.M. Jones" <rjo...@redhat.com> > Cc: Markus Armbruster <arm...@redhat.com> > Cc: Peter Crosthwaite <crosthwaite.pe...@gmail.com> > Cc: Richard Henderson <r...@twiddle.net> > Cc: "Aneesh Kumar K.V" <aneesh.ku...@linux.vnet.ibm.com> > Cc: Greg Kurz <gr...@kaod.org> > Cc: Rob Herring <r...@kernel.org> > Cc: Peter Maydell <peter.mayd...@linaro.org> > Cc: Peter Chubb <peter.ch...@nicta.com.au> > Cc: Eduardo Habkost <ehabk...@redhat.com> > Cc: Marcel Apfelbaum <mar...@redhat.com> > Cc: "Michael S. Tsirkin" <m...@redhat.com> > Cc: Igor Mammedov <imamm...@redhat.com> > Cc: David Gibson <da...@gibson.dropbear.id.au> > Cc: Alexander Graf <ag...@suse.de> > Cc: Gerd Hoffmann <kra...@redhat.com> > Cc: Jason Wang <jasow...@redhat.com> > Cc: Marcelo Tosatti <mtosa...@redhat.com> > Cc: Christian Borntraeger <borntrae...@de.ibm.com> > Cc: Cornelia Huck <coh...@redhat.com> > Cc: Stefan Hajnoczi <stefa...@redhat.com> > Acked-by: David Gibson <da...@gibson.dropbear.id.au> > Acked-by: Greg Kurz <gr...@kaod.org> > Acked-by: Cornelia Huck <coh...@redhat.com> > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> > Reviewed by: Peter Chubb <peter.ch...@data61.csiro.au> > Acked-by: Max Reitz <mre...@redhat.com> > Acked-by: Marcel Apfelbaum <mar...@redhat.com> > --- > 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