qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v2 2/2] cdrom: Make disc change event visible to


From: Amit Shah
Subject: [Qemu-devel] Re: [PATCH v2 2/2] cdrom: Make disc change event visible to guests
Date: Thu, 7 Apr 2011 14:21:48 +0530
User-agent: Mutt/1.5.21 (2010-09-15)

On (Thu) 07 Apr 2011 [09:41:09], Stefan Hajnoczi wrote:
> On Thu, Apr 07, 2011 at 10:35:19AM +0530, Amit Shah wrote:
> > +       /*
> > +        * First, check if there's any pending media change
> > +        * notification to be given.
> > +        *
> > +        * We want the guest to notice an empty tray between a cd
> > +        * change, so send one MEDIUM_NOT_PRESENT message after a
> > +        * cd change.
> > +        *
> > +        * After we've sent that message, the guest will poke at
> > +        * us again and send the UNIT_ATTENTION message then.
> > +        * Once this is done, reset the UNIT_ATTENTION message to
> > +        * ensure we don't keep repeating it.
> > +        */
> 
> Indentation is off here.

Fixed in v3.

> > +            if (!s->media_change_notified) {
> > +                ide_atapi_cmd_error(s, SENSE_NOT_READY,
> > +                                    ASC_MEDIUM_NOT_PRESENT);
> > +                s->media_change_notified = 1;
> > +            } else if (s->cdrom_changed) {
> > +                s->sense_key = SENSE_UNIT_ATTENTION;
> > +                s->asc = ASC_MEDIUM_MAY_HAVE_CHANGED;
> > +                ide_atapi_cmd_ok(s);
> > +
> > +                s->cdrom_changed = 0;
> > +           sense = SENSE_NONE;
> 
> Indentation is off here.
> 
> Otherwise looks good.  I will test a Windows 2003 Server guest.

Thanks; I tested Win XP and RHEL6 guests.

                Amit



reply via email to

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