qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V4 09/12] hw/sd.c: convert SD state to QOM objec


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH V4 09/12] hw/sd.c: convert SD state to QOM object
Date: Tue, 31 Jul 2012 10:59:39 +0100

On 31 July 2012 10:45, Markus Armbruster <address@hidden> wrote:
> Igor Mitsyanko <address@hidden> writes:
>> @@ -1510,7 +1508,7 @@ void sd_write_data(SDState *sd, uint8_t value)
>>          return;
>>
>>      if (sd->state != sd_receivingdata_state) {
>> -        fprintf(stderr, "sd_write_data: not in Receiving-Data state\n");
>> +        fprintf(stderr, "sd_write_card_data: not in Receiving-Data 
>> state\n");
>
> Outside this patch's scope, but here goes anyway: what kind of condition
> is reported here?  Programming error that should never happen?  Guest
> doing something weird?

This particular case I think is "SD card controller model tried
to do something wrong".

> Same for all the other fprintf(stderr, ...) in this file.

Various uses:
 * guest legitimately did something we feel like telling the user
   about (eg "Card force-erased by CMD42")
 * guest did something dubious but with defined semantics
   ("Unknown CMD", trying to do something when the card is locked)
 * guest did something legitimate but unimplemented
 * underlying block layer read/write failed (and we are about
   to throw away the error rather than reporting it anywhere else!)

These would all be worth tidying up some day when we have a
sensible logging infrastructure to tidy them up into.

-- PMM



reply via email to

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