]> xenbits.xensource.com Git - libvirt.git/commit
fdstream: drop delete argument
authorEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 17:19:53 +0000 (11:19 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 2 Aug 2011 20:53:43 +0000 (14:53 -0600)
commit00ef048f62c9789e5d2f8848e16627cc30248259
tree3bee43540d7e204952d557140a5776e77522ab64
parent440d6b6a0bd4c971bfc045c17ac2c8128d5ec82e
fdstream: drop delete argument

Revert 6a1f5f568f8.  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.
src/fdstream.c
src/fdstream.h
src/lxc/lxc_driver.c
src/qemu/qemu_driver.c
src/storage/storage_driver.c
src/uml/uml_driver.c
src/vbox/vbox_tmpl.c
src/xen/xen_driver.c