From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scuzo-0002j6-2m for qemu-devel@nongnu.org; Fri, 08 Jun 2012 04:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Scuzm-00036p-63 for qemu-devel@nongnu.org; Fri, 08 Jun 2012 04:56:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scuzl-00036g-VG for qemu-devel@nongnu.org; Fri, 08 Jun 2012 04:56:38 -0400 Message-ID: <4FD1BE3A.2060009@redhat.com> Date: Fri, 08 Jun 2012 10:56:26 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <4FCC81A0.3080707@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/6] fdc: use LOG_UNIMP logging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paolo Bonzini , qemu-devel , Peter Maydell Am 07.06.2012 23:07, schrieb Blue Swirl: > On Mon, Jun 4, 2012 at 9:36 AM, Kevin Wolf 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 >> >> 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