[Top][All Lists]
[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: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] Re: [PATCH v2 2/2] cdrom: Make disc change event visible to guests |
Date: |
Thu, 7 Apr 2011 09:41:09 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
> + 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.
Stefan
- [Qemu-devel] Re: [PATCH v2 1/2] cdrom: Allow the TEST_UNIT_READY command after a cdrom change, (continued)
[Qemu-devel] [PATCH v2 2/2] cdrom: Make disc change event visible to guests, Amit Shah, 2011/04/07