[libvirt] [PATCH 3/4] storage: Add created to virDirCreate

Peter Krempa pkrempa at redhat.com
Wed Oct 7 06:50:13 UTC 2015


On Tue, Oct 06, 2015 at 18:34:55 -0400, John Ferlan wrote:
> Add a new boolean 'created' to virDirCreate to be set when a directory
> is created either directly or in a fork'd child.  This will allow
> a caller to make "decisions" regarding whether or not to delete the
> directory since virDirCreate has many other failure scenarios and there's
> no guarantee that the mkdir was the cause for failure.

Is there actually a need to pass the 'created' bool out? Can't the
function just delete the directory internally in case a failure happens?

The new semantics basically would be:

virDirCreate was successful -> we have a new dir we can use
virDirCreate failed -> nothing to do/clean up

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151007/412a6ef7/attachment-0001.sig>


More information about the libvir-list mailing list