|
| From: | Paolo Bonzini |
| Subject: | [Qemu-devel] Re: [PATCH V3] floppy: save and restore DIR register |
| Date: | Fri, 01 Apr 2011 09:15:09 +0200 |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 04/01/2011 08:22 AM, Jason Wang wrote:
+
+ if (drive->bs == NULL) {
+ return 1;
Is it okay to return 1 here? Have you tested the case when both the source and the target drives have no floppy?
(The "media_changed == 2" in my sample code was basically a way to save the "media present" state of the drive on the source).
+ } else {
+ drive->bs->media_changed = drive->media_changed;
+ return 0;
+ }
The code is also missing the case of a pc-0.14 machine. The problem here is that the pc-0.15 machine hasn't been created yet, you get the honor. :(
Paolo
| [Prev in Thread] | Current Thread | [Next in Thread] |