From: Kevin Wolf <kwolf@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 5/6] fdc: use LOG_UNIMP logging
Date: Fri, 08 Jun 2012 10:56:26 +0200 [thread overview]
Message-ID: <4FD1BE3A.2060009@redhat.com> (raw)
In-Reply-To: <CAAu8pHsrF43y+0wWdbJ5=SedFY=hvyDk2k0asPxZDroRgRaR4w@mail.gmail.com>
Am 07.06.2012 23:07, schrieb Blue Swirl:
> On Mon, Jun 4, 2012 at 9:36 AM, Kevin Wolf <kwolf@redhat.com> 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 <blauwirbel@gmail.com>
>>
>> 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.
Kevin
next prev parent reply other threads:[~2012-06-08 8:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-03 17:38 [Qemu-devel] [PATCH 5/6] fdc: use LOG_UNIMP logging Blue Swirl
2012-06-04 9:36 ` Kevin Wolf
2012-06-07 21:07 ` Blue Swirl
2012-06-08 8:56 ` Kevin Wolf [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-09 12:12 [Qemu-devel] [PATCH v2 0/6] Log unimplemented functionality Blue Swirl
2012-06-09 12:12 ` [Qemu-devel] [PATCH 5/6] fdc: use LOG_UNIMP logging Blue Swirl
2012-06-11 13:09 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD1BE3A.2060009@redhat.com \
--to=kwolf@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).