diff mbox

[v3,8/8] error: Add a 'error: ' prefix to error_report()

Message ID 12e6dde67e57a0ecf09fbe6103512543113ca07a.1499774331.git.alistair.francis@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alistair Francis July 11, 2017, 12:07 p.m. UTC
As we don't regard error messages as a stable API the let's add a
'error: ' prefix to the original error_report() messages.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---

 util/qemu-error.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Max Reitz July 11, 2017, 5:44 p.m. UTC | #1
On 2017-07-11 14:07, Alistair Francis wrote:
> As we don't regard error messages as a stable API the let's add a
> 'error: ' prefix to the original error_report() messages.
> 
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
> 
>  util/qemu-error.c | 1 +
>  1 file changed, 1 insertion(+)

This breaks quite a few qemu-iotests.

Max
Alistair Francis July 12, 2017, 12:27 p.m. UTC | #2
On Tue, Jul 11, 2017 at 7:44 PM, Max Reitz <mreitz@redhat.com> wrote:
> On 2017-07-11 14:07, Alistair Francis wrote:
>> As we don't regard error messages as a stable API the let's add a
>> 'error: ' prefix to the original error_report() messages.
>>
>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
>> ---
>>
>>  util/qemu-error.c | 1 +
>>  1 file changed, 1 insertion(+)
>
> This breaks quite a few qemu-iotests.

Hmmm... Ok, I'll have to dig into that.

I'm traveling at the moment so I won't get a chance to fix this. I'm
going to send the next version of this series, but remove this patch
and I can look at adding it again when I get back. There is already a
few things that have been pointed out that need to be fixed after this
patch set.

Do people think we should add this prefix or leave the error messages
as is? I haven't heard a definitive answer if people think this is the
right path to take.

Thanks,
Alistair

>
> Max
>
Max Reitz July 12, 2017, 12:37 p.m. UTC | #3
On 2017-07-12 14:27, Alistair Francis wrote:
> On Tue, Jul 11, 2017 at 7:44 PM, Max Reitz <mreitz@redhat.com> wrote:
>> On 2017-07-11 14:07, Alistair Francis wrote:
>>> As we don't regard error messages as a stable API the let's add a
>>> 'error: ' prefix to the original error_report() messages.
>>>
>>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
>>> ---
>>>
>>>  util/qemu-error.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>
>> This breaks quite a few qemu-iotests.
> 
> Hmmm... Ok, I'll have to dig into that.
> 
> I'm traveling at the moment so I won't get a chance to fix this. I'm
> going to send the next version of this series, but remove this patch
> and I can look at adding it again when I get back. There is already a
> few things that have been pointed out that need to be fixed after this
> patch set.
> 
> Do people think we should add this prefix or leave the error messages
> as is? I haven't heard a definitive answer if people think this is the
> right path to take.

I don't really mind either way.  But it probably is a good idea to
separate this one patch from this series.

Max
Markus Armbruster July 12, 2017, 1:03 p.m. UTC | #4
Alistair Francis <alistair.francis@xilinx.com> writes:

> On Tue, Jul 11, 2017 at 7:44 PM, Max Reitz <mreitz@redhat.com> wrote:
>> On 2017-07-11 14:07, Alistair Francis wrote:
>>> As we don't regard error messages as a stable API the let's add a
>>> 'error: ' prefix to the original error_report() messages.
>>>
>>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
>>> ---
>>>
>>>  util/qemu-error.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>
>> This breaks quite a few qemu-iotests.
>
> Hmmm... Ok, I'll have to dig into that.
>
> I'm traveling at the moment so I won't get a chance to fix this. I'm
> going to send the next version of this series, but remove this patch
> and I can look at adding it again when I get back. There is already a
> few things that have been pointed out that need to be fixed after this
> patch set.

Separating this change from the rest of the series makes sense, because
it lets use get the bulk of your work in more quickly.

> Do people think we should add this prefix or leave the error messages
> as is? I haven't heard a definitive answer if people think this is the
> right path to take.

I'd leave them as is.  More inertia than opposition.  If you think a
prefix solves a problem people have, by all means post a patch.  Please
explain in the commit message why the patch is useful.  The current one
explains only why we can change error messages, not why we *want* to
change them.
diff mbox

Patch

diff --git a/util/qemu-error.c b/util/qemu-error.c
index c557c6ae47..3a3372b68b 100644
--- a/util/qemu-error.c
+++ b/util/qemu-error.c
@@ -203,6 +203,7 @@  static void vreport(report_type type, const char *fmt, va_list ap)
 
     switch (type) {
     case REPORT_TYPE_ERROR:
+        error_printf("error: ");
         break;
     case REPORT_TYPE_WARNING:
         error_printf("warning: ");