On 05/28/2013 11:31 AM, Eric Blake wrote: > On 05/28/2013 08:37 AM, Cole Robinson wrote: >> If we are just ejecting media, ret == -1 even after the retry loop >> determines that the tray is open, as requested. This means media >> disconnect always report's error. >> >> Fix it, and fix some other mini issues: >> >> - Don't overwrite the 'eject' error message if the retry loop fails >> - Move the retries decrement inside the loop, otherwise the final loop >> might succeed, yet retries == 0 and we will raise error >> - Setting ret = -1 in the disk->src check is unneeded >> - Fix comment typos >> >> cc: mprivozn@xxxxxxxxxx >> --- >> src/qemu/qemu_hotplug.c | 26 ++++++++++++++------------ >> 1 file changed, 14 insertions(+), 12 deletions(-) > > ACK. > >> + >> + if (disk->src) { >> + /* deliberately don't depend on 'ret' as 'eject' may have failed the >> + * first time and we are gonna check the drive state anyway */ > > Comment motion, but might be worth s/gonna/going to/ while touching it > (I'm actually surprised that thunderbird didn't flag the slang 'gonna' > as a misspelled word). > Thanks, pushed with that comment fix. - Cole -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list