qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Gleb Natapov <gleb@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu list <qemu-devel@nongnu.org>
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	[thread overview]
Message-ID: <20110407085147.GB11546@amit-x200.redhat.com> (raw)
In-Reply-To: <20110407084109.GA21709@stefanha-thinkpad.localdomain>

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	other threads:[~2011-04-07  8:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  5:05 [Qemu-devel] [PATCH v2 0/2] Correct transitions for cd change state Amit Shah
2011-04-07  5:05 ` [Qemu-devel] [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change Amit Shah
2011-04-07  7:22   ` [Qemu-devel] " Paolo Bonzini
2011-04-07  8:42   ` Stefan Hajnoczi
2011-04-07  8:51     ` Amit Shah
2011-04-07  8:59   ` Kevin Wolf
2011-04-07  9:11     ` Amit Shah
2011-04-07 10:20       ` Kevin Wolf
2011-04-07 11:15         ` Amit Shah
2011-04-07  5:05 ` [Qemu-devel] [PATCH v2 2/2] cdrom: Make disc change event visible to guests Amit Shah
2011-04-07  7:31   ` [Qemu-devel] " Paolo Bonzini
2011-04-07  8:01     ` Amit Shah
2011-04-07  8:41   ` Stefan Hajnoczi
2011-04-07  8:51     ` Amit Shah [this message]

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=20110407085147.GB11546@amit-x200.redhat.com \
    --to=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.com \
    /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).