• M
    qemu_hotplug: Rework media changing process · 7c4b6833
    Michal Privoznik 提交于
    https://bugzilla.redhat.com/show_bug.cgi?id=892289
    
    It seems like with new udev within guest OS, the tray is locked,
    so we need to:
    - 'eject'
    - wait for tray to open
    - 'change'
    
    Moreover, even when doing bare 'eject', we should check for
    'tray_open' as guest may have locked the tray. However, the
    waiting phase shouldn't be unbounded, so I've chosen 10 retries
    maximum, each per 500ms. This should give enough time for guest
    to eject a media and open the tray.
    (cherry picked from commit 84c59ffa)
    7c4b6833
qemu_hotplug.c 82.4 KB