Skip to content

Commit

Permalink
Convert remaining error_report() to warn_report()
Browse files Browse the repository at this point in the history
In a previous patch (3dc6f86) we
converted uses of error_report("warning:"... to use warn_report()
instead. This was to help standardise on a single method of printing
warnings to the user.

There appears to have been some cases that slipped through in patch sets
applied around the same time, this patch catches the few remaining
cases.

All of the warnings were changed using this command:
  find ./* -type f -exec sed -i \
    's|error_report(".*warning[,:] |warn_report("|Ig' {} +

Indentation fixed up manually afterwards.

Two messages were manually fixed up as well.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <eec8cba0d5434bd828639e5e45f12182490ff47d.1505158760.git.alistair.francis@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
alistair23 authored and bonzini committed Sep 19, 2017
1 parent 9e5d2c5 commit 55d527a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions block/qcow2.c
Expand Up @@ -301,10 +301,11 @@ static int qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset,
}

if (!(s->autoclear_features & QCOW2_AUTOCLEAR_BITMAPS)) {
error_report("WARNING: a program lacking bitmap support "
"modified this file, so all bitmaps are now "
"considered inconsistent. Some clusters may be "
"leaked, run 'qemu-img check -r' on the image "
warn_report("a program lacking bitmap support "
"modified this file, so all bitmaps are now "
"considered inconsistent");
error_printf("Some clusters may be leaked, "
"run 'qemu-img check -r' on the image "
"file to fix.");
if (need_update_header != NULL) {
/* Updating is needed to drop invalid bitmap extension. */
Expand Down
4 changes: 2 additions & 2 deletions target/s390x/kvm.c
Expand Up @@ -224,8 +224,8 @@ static void kvm_s390_enable_cmma(void)
};

if (mem_path) {
error_report("Warning: CMM will not be enabled because it is not "
"compatible to hugetlbfs.");
warn_report("CMM will not be enabled because it is not "
"compatible with hugetlbfs.");
return;
}
rc = kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr);
Expand Down
4 changes: 2 additions & 2 deletions trace/control.c
Expand Up @@ -72,8 +72,8 @@ void trace_event_register_group(TraceEvent **events)
if (likely(next_vcpu_id < CPU_TRACE_DSTATE_MAX_EVENTS)) {
events[i]->vcpu_id = next_vcpu_id++;
} else {
error_report("WARNING: too many vcpu trace events; dropping '%s'",
events[i]->name);
warn_report("too many vcpu trace events; dropping '%s'",
events[i]->name);
}
}
event_groups = g_renew(TraceEventGroup, event_groups, nevent_groups + 1);
Expand Down

0 comments on commit 55d527a

Please sign in to comment.