• C
    qemu: Don't report error on successful media eject · f8085a54
    Cole Robinson 提交于
    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@redhat.com
    (cherry picked from commit 406d8a98)
    f8085a54
qemu_hotplug.c 82.7 KB