• E
    fdstream: drop delete argument · 00ef048f
    Eric Blake 提交于
    Revert 6a1f5f56.  Now that libvirt_iohelper takes fds by
    inheritance rather than by open() (commit 1eb66479), there is
    no longer a race where the parent can unlink() a file prior to
    the iohelper open()ing the same file.  From there, it makes
    more sense to have the callers both create and unlink, rather
    than the caller create and the stream unlink, since the latter
    was only needed when iohelper had to do the unlink.
    
    * src/fdstream.h (virFDStreamOpenFile, virFDStreamCreateFile):
    Callers are responsible for deletion.
    * src/fdstream.c (virFDStreamOpenFileInternal): Don't leak created
    file on failure.
    (virFDStreamOpenFile, virFDStreamCreateFile): Drop parameter.
    * src/lxc/lxc_driver.c (lxcDomainOpenConsole): Update callers.
    * src/qemu/qemu_driver.c (qemuDomainScreenshot)
    (qemuDomainOpenConsole): Likewise.
    * src/storage/storage_driver.c (storageVolumeDownload)
    (storageVolumeUpload): Likewise.
    * src/uml/uml_driver.c (umlDomainOpenConsole): Likewise.
    * src/vbox/vbox_tmpl.c (vboxDomainScreenshot): Likewise.
    * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
    00ef048f
uml_driver.c 68.4 KB