[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/6] fdc: use LOG_UNIMP logging

From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 5/6] fdc: use LOG_UNIMP logging
Date: Fri, 08 Jun 2012 10:56:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Am 07.06.2012 23:07, schrieb Blue Swirl:
> On Mon, Jun 4, 2012 at 9:36 AM, Kevin Wolf <address@hidden> wrote:
>> Am 03.06.2012 19:38, schrieb Blue Swirl:
>>> Convert uses of FLOPPY_ERROR to either FLOPPY_DPRINTF
>>> (for implemented cases) or to use LOG_UNIMP (unimplemented).
>>> Signed-off-by: Blue Swirl <address@hidden>
>> I would suggest that you check the messages of those cases that became
>> FLOPPY_DPRINTF(). Originally the macro printed "FLOPPY ERROR: " and now
>> it's not even mentioned any more that it is an error message, making
>> messages like "writing sector %d" totally misleading.
> Is that an error condition at all? It looks like just debugging.

Not sure if all of them are error conditions (that's why I asked you to
check), and yes, they are just debugging. But for example have a look at
this code:

    if (bdrv_write(cur_drv->bs, fd_sector(cur_drv),
                   fdctrl->fifo, 1) < 0) {
        FLOPPY_ERROR("writing sector %d\n", fd_sector(cur_drv));

The debug message says "FLOPPY ERROR: writing sector 42" today, which is
correct because the message is printed only if bdrv_write() fails. After
your change it would say "FLOPPY: writing sector 42", which has a
completely different meaning - it implies that the message is printed on
each write and it doesn't make obvious that an error occurred.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]