On 31 July 2012 10:45, Markus Armbruster <arm...@redhat.com> wrote: > Igor Mitsyanko <i.mitsya...@samsung.com> 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